'Essilor Recap' => 'com.fluidbook.player.basket.custom.essilorrecap.EssilorRecapBasketManager',
'Wesco Ventes' => 'com.fluidbook.player.basket.custom.wesco.WescoBasketManager',
'Atlantic Download' => 'com.fluidbook.player.basket.custom.atlantic.AtlanticDownloadBasketManager',
- 'Remarkable' => 'Remarkable'
+ 'Remarkable' => 'Remarkable',
+ 'Zoom + lien produit' => 'ZoomProductLink',
), 'grade' => 5);
$this->fields['basketReferences'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
'label' => __('Références produits'), 'grade' => 3, 'fileFilter' => $basketFilter, 'hint' => __('Fichier contenant les références produits'), 'dir' => 'commerce');
case 'Remarkable':
return new remarkableCartLink($id, $init, $compiler);
break;
+ case 'ZoomProductLink':
+ return new zoomProductLink($id, $init, $compiler);
+ break;
default :
return new cartLink($id, $init, $compiler);
break;
$lines = CubeIT_Text::splitLines($animation);
foreach ($lines as $line) {
$e = explode('=', $line);
+ if (count($e) < 2) {
+ continue;
+ }
$v = trim($e[1]);
// Handle values surronded by quotes
if (preg_match('|^\"([^\"]+)\"$|', $v, $matches)) {
}
$variables[trim($e[0])] = $v;
}
+ if (!isset($variables['direction'])) {
+ $variables['direction'] = 'right';
+ }
if ($variables['direction'] == 'top') {
$variables['direction'] = 'up';
}
$res .= ' id="' . $this->uid . '"';
// Data attributes
- $attributes = [
- 'maxzoom' => empty($this->to) ? $this->maxzoom_default : $this->to,
- 'group' => $this->group,
- 'group-count' => empty($this->group) ? 0 : count(explode(',', $this->group)),
- 'width' => round($this->width),
- 'height' => round($this->height),
- 'x' => round($this->left),
- 'y' => round($this->top)
- ];
+ $attributes = $this->getZoomAttributes();
// Set data attributes
foreach ($attributes as $key => $val) {
return $res;
}
+ public function getZoomAttributes()
+ {
+ return [
+ 'maxzoom' => empty($this->to) ? $this->maxzoom_default : $this->to,
+ 'group' => $this->group,
+ 'group-count' => empty($this->group) ? 0 : count(explode(',', $this->group)),
+ 'width' => round($this->width),
+ 'height' => round($this->height),
+ 'x' => round($this->left),
+ 'y' => round($this->top)
+ ];
+ }
+
public function generateImage()
{
}
}
+class zoomProductLink extends zoomLink
+{
+ public function getZoomAttributes()
+ {
+ $cart =$this->compiler->getCartData();
+
+ return array_merge(parent::getZoomAttributes(),
+ ['maxzoom' => $this->maxzoom_default, 'ref' => $this->to, 'shareurl' => $url, 'producturl' => $url]
+ );
+ }
+}
+
class slideshowLink extends normalLink
{