return false;
}
+ public function writeFlexipanCart()
+ {
+ $this->lessVariables['import-cart-styles'] = 'flexipan';
+
+ $this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js');
+ $this->addJsLib('flexipan', 'js/libs/fluidbook/cart/fluidbook.cart.flexipan.js');
+ $this->addJsLib('html2pdf', 'js/libs/html2pdf/html2pdf.min.js');
+
+ $cdir = $this->wdir . '/commerce/';
+
+
+ $file = $cdir . $this->book->parametres->basketReferences;
+ $this->config->basketReferences = wsUtil::excelToArrayKeyVars($file);
+
+ wsLinks::getLinksAndRulersFromFile($this->book_id, $links, $rulers);
+
+ foreach ($links as $link) {
+ if ($link['type'] == '12') {
+
+ }
+ }
+
+ $this->config->product_zoom_references = [];
+ foreach ($this->config->basketReferences as $ref => $data)
+ $this->config->product_zoom_references[$ref] = [$ref];
+ }
+ }
+
public function writeMIFCart()
{
$this->lessVariables['import-cart-styles'] = 'mif';
if ($this->config->basket) {
$this->addJsLib('cart', 'js/libs/fluidbook/fluidbook.cart.js');
switch ($this->config->basketManager) {
+ case 'Flexipan';
+ return $this->writeFlexipanCart();
case 'Puma':
return $this->writePumaCart();
case 'MIF':
return new actionLink($id, $init, $compiler);
case 12:
- if ($compiler->book->parametres->basketManager === 'Puma' || $compiler->book->parametres->basketManager === 'MIF') {
+ if ($compiler->book->parametres->basketManager === 'Puma' || $compiler->book->parametres->basketManager === 'MIF' || $compiler->book->parametres->basketManager === 'Flexipan') {
return new zoomProductLink($id, $init, $compiler);
}
if ($compiler->book->parametres->product_zoom_references !== '') {
return $this->_content;
}
- public function getLottieContent($c, $width, $height)
- {
- $this->_config = ['width' => $this->width * $this->getCssScale(), 'height' => $this->height * $this->getCssScale()];
- $parsedLottie = self::_parseLottieContent($c);
-
- $lottieID = $this->compiler->addLottie($parsedLottie['animation'], $parsedLottie['params'], $parsedLottie['hash']);
- return '<div class="lottie" data-lottie-id="' . $lottieID . '"></div>';
- }
-
- public static function _parseLottieContent($c)
- {
- $hash = hash('sha256', $c);
- $start = mb_strpos($c, 'var animationData = {') + 20;
- $end = mb_strpos($c, '};', $start) + 1;
- $ad = mb_substr($c, $start, $end - $start);
- $animationData = json_decode($ad);
- preg_match('/var params = (\{.*\});/sU', $c, $matches);
- $matches[1] = str_replace('container: document.getElementById(\'lottie\'),', '', $matches[1]);
- $matches[1] = str_replace('animationData: animationData', '', $matches[1]);
- $params = CJSON::decode($matches[1]);
- return ['animation' => $animationData, 'params' => $params, 'hash' => $hash];
- }
+// public function getLottieContent($c, $width, $height)
+// {
+// $this->_config = ['width' => $this->width * $this->getCssScale(), 'height' => $this->height * $this->getCssScale()];
+// $parsedLottie = self::_parseLottieContent($c);
+//
+// $lottieID = $this->compiler->addLottie($parsedLottie['animation'], $parsedLottie['params'], $parsedLottie['hash']);
+// return '<div class="lottie" data-lottie-id="' . $lottieID . '"></div>';
+// }
+//
+// public static function _parseLottieContent($c)
+// {
+// $hash = hash('sha256', $c);
+// $start = mb_strpos($c, 'var animationData = {') + 20;
+// $end = mb_strpos($c, '};', $start) + 1;
+// $ad = mb_substr($c, $start, $end - $start);
+// $animationData = json_decode($ad);
+// preg_match('/var params = (\{.*\});/sU', $c, $matches);
+// $matches[1] = str_replace('container: document.getElementById(\'lottie\'),', '', $matches[1]);
+// $matches[1] = str_replace('animationData: animationData', '', $matches[1]);
+// $params = CJSON::decode($matches[1]);
+// return ['animation' => $animationData, 'params' => $params, 'hash' => $hash];
+// }
public function getHTMLContainerClass()
{