Jump to content

Can not get $_GET param on hookActionCartSave


phinq1910

Recommended Posts

I have custom the delete link on shopping cart page:

<a rel="nofollow" title="Delete" class="cart_quantity_delete" id="1_2_0_0" href="https://localhost/prestashop/index.php?controller=cart&delete=1&id_product=1&ipa=2&id_address_delivery=0&token=8166adf73107550815eb1705e2366f97&ok=1"><i class="icon-trash"></i></a> 

But in hookActionCartSave I can not get it. 

$ok= Tools::getValue('ok', '0');

It always = 0 because does not exists $_GET['ok']. I think the cache has clean.

 

So How can I get value of this variable in hookActionCartSave?

Link to comment
Share on other sites

I have custom the delete link on shopping cart page:

<a rel="nofollow" title="Delete" class="cart_quantity_delete" id="1_2_0_0" href="https://localhost/prestashop/index.php?controller=cart&delete=1&id_product=1&ipa=2&id_address_delivery=0&token=8166adf73107550815eb1705e2366f97&ok=1"><i class="icon-trash"></i></a> 

But in hookActionCartSave I can not get it. 

$ok= Tools::getValue('ok', '0');

It always = 0 because does not exists $_GET['ok']. I think the cache has clean.

 

So How can I get value of this variable in hookActionCartSave?

 

Probably you are doing this action via AJAX and this parameter is not sent.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...