add to cart in prestashop


if (!$this->context->cart->id) {
               if (Context::getContext()->cookie->id_guest) {
                   $guest = new Guest(Context::getContext()->cookie->id_guest);
                   $this->context->cart->mobile_theme = $guest->mobile_theme;
               }
               $this->context->cart->add();
               if ($this->context->cart->id) {
                   $this->context->cookie->id_cart = (int)$this->context->cart->id;
               }
           }

Comments

  1. Hi There,
    Thank you for sharing the knowledgeable blog with us I hope that you will post many more blog with us:-
    Our Minneapolis bakery lobby reopens on Monday, August 23. We're excited to welcome you back for walk-in cookie purchases.
    Email:sales@big-smokes.com
    Click here for more information:- more info

    ReplyDelete

Post a Comment

Popular Posts