Jump to content

Edit History

PawelTR

PawelTR

@ndiaga I copy CartController to override/controllers/front in my module and add this code for him:

 <?php

use PrestaShop\PrestaShop\Adapter\Presenter\Cart\CartPresenter;

class CartController extends CartControllerCore
{
    public $php_self = 'cart';

    public function init()
    {
        parent::init();
        $this->qty = abs(Tools::getValue('qty', 1));
        var_dump(1);

        if ($this->qty >= 2) {
            #How can i show notification?
        }
    }

}

all works fine, but how i can show for example js message when $this->qty is > = 2 ??

PawelTR

PawelTR

i copy CartController to override/controllers/front in my module and add this code for him:

 <?php

use PrestaShop\PrestaShop\Adapter\Presenter\Cart\CartPresenter;

class CartController extends CartControllerCore
{
    public $php_self = 'cart';

    public function init()
    {
        parent::init();
        $this->qty = abs(Tools::getValue('qty', 1));
        var_dump(1);

        if ($this->qty >= 2) {
            #How can i show notification?
        }
    }

}

all works fine, but how i can show for example js message when $this->qty is > = 2 ??

PawelTR

PawelTR

i copy CartController to override/controllers/front in my module and add this code for him:

 <?php

use PrestaShop\PrestaShop\Adapter\Presenter\Cart\CartPresenter;

class CartController extends CartControllerCore
{
    public $php_self = 'cart';

    public function init()
    {
        parent::init();
        $this->qty = abs(Tools::getValue('qty', 1));
        var_dump(1);

        if ($this->qty >= 2) {
            #How can i show notification?
        }
    }

}

But how i can show for example js message when $this->qty is > = 2 ??

×
×
  • Create New...