return new videoPopupLink($id, $init, $compiler);
case 7:
if ($compiler->book->parametres->basketManager === 'Puma') {
- return new cartLink($id, $init, $compiler);
+ return new pumaCartLink($id, $init, $compiler);
}
switch ($compiler->book->parametres->customLinkClass) {
case 'WescoLink':
{
protected $role = 'link';
+ public function getInnerContent()
+ {
+ return '';
+ }
+
public function getHTMLContent()
{
$class = $this->getClasses();
if (isset($this->extra->blinkdelay)) {
$attrs .= ' data-blinkdelay="' . intval($this->extra->blinkdelay) . '"';
}
- return '<a href="' . $this->getURL() . '" data-type="' . $this->type . '" target="' . $this->getTarget() . '"' . $attrs . $this->getAdditionnalContent() . $this->getTrack() . '></a>';
+ return '<a href="' . $this->getURL() . '" data-type="' . $this->type . '" target="' . $this->getTarget() . '"' . $attrs . $this->getAdditionnalContent() . $this->getTrack() . '>' . $this->getInnerContent() . '</a>';
}
}
+class pumaCartLink extends cartLink
+{
+ public function getInnerContent()
+ {
+ return '<svg enable-background="new 0 0 28 28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><g class="on">
+<circle cx="14" cy="14" fill="#b09474" r="14"/><path d="m14 21.152c-.188 0-.368-.075-.5-.208l-5.507-5.536c-1.209-1.164-1.51-2.955-.737-4.446.978-1.883 3.357-2.652 5.305-1.714.383.185.729.426 1.03.716l.409.394.41-.395c1.54-1.484 4.047-1.484 5.587 0 .303.292.554.627.747.998.773 1.491.473 3.282-.747 4.457l-5.497 5.526c-.132.133-.312.208-.5.208z" fill="#fff"/>
+</g><g class="off">
+<circle cx="14" cy="14" fill="#b09474" opacity=".5" r="14"/><path d="m14 21.152c-.188 0-.368-.075-.5-.208l-5.507-5.536c-1.209-1.164-1.51-2.955-.737-4.446.978-1.883 3.357-2.652 5.305-1.714.383.185.729.426 1.03.716l.409.394.41-.395c1.54-1.484 4.047-1.484 5.587 0 .303.292.554.627.747.998.773 1.491.473 3.282-.747 4.457l-5.497 5.526c-.132.133-.312.208-.5.208zm-3.202-10.896c-.94 0-1.844.497-2.29 1.355-.483.931-.292 2.053.475 2.792l5.017 5.044 5.007-5.033c.777-.749.968-1.871.485-2.802-.122-.234-.281-.447-.473-.632-1.001-.965-2.629-.965-3.63 0l-.899.866c-.273.263-.705.263-.979 0l-.899-.866c-.193-.187-.416-.341-.663-.46-.371-.18-.764-.264-1.151-.264z" fill="#fff"/>
+</g></svg>';
+ }
+}
+
class cartLink extends normalLink
{
{
$hash = hash('sha256', $c);
$start = mb_strpos($c, 'var animationData = {') + 20;
- $end = mb_strpos($c, '};', $start)+1;
+ $end = mb_strpos($c, '};', $start) + 1;
$ad = mb_substr($c, $start, $end - $start);
$animationData = json_decode($ad);
preg_match('/var params = (\{.*\});/sU', $c, $matches);