Jump to content

Edit History

haunter

haunter

On 4/16/2019 at 3:53 PM, stek. said:

Hi Rolige,

thanks for your answer. You had right! It was a module issue. Reading your answer, it had noticed that when I was logged in the cart ajax request returned 302. 

Searching on web, I found that the issue was the token inside the button-cart.tpl. I had modified  the static string with {$static_token} and so now it's working.

 

I hope that this is useful for anyone.

Stek  

You saved me lot of time! In my case, I had in form for add to cart this:
 

<form action="{$urls.pages.cart}" method="post" class="hiaddtocart">
                                <input type="hidden" name="token" value="{$token}">
                                <input type="hidden" name="id_product" value="{$product.id}" class="product_page_product_id">
                                <input type="hidden" name="id_customization" value="0" class="product_customization_id">
                                <button class="btn btn-primary fa-shopping-basket" {if ($product.quantity == 0)}disabled{/if} data-button-action="add-to-cart" type="submit">
                                    Add to cart
                                </button>
                            </form>

And just replaced $token with $static_token

 

Thank you very much stek. !

haunter

haunter

On 4/16/2019 at 3:53 PM, stek. said:

Hi Rolige,

thanks for your answer. You had right! It was a module issue. Reading your answer, it had noticed that when I was logged in the cart ajax request returned 302. 

Searching on web, I found that the issue was the token inside the button-cart.tpl. I had modified  the static string with {$static_token} and so now it's working.

 

I hope that this is useful for anyone.

Stek  

You saved me lot of time! In my case, I had in form for add to cart this:
 

<form action="{$urls.pages.cart}" method="post" class="hiaddtocart">
                                <input type="hidden" name="token" value="{$token}">
                                <input type="hidden" name="id_product" value="{$product.id}" class="product_page_product_id">
                                <input type="hidden" name="id_customization" value="0" class="product_customization_id">
                                <button class="btn btn-primary fa-shopping-basket" {if ($product.quantity == 0)}disabled{/if} data-button-action="add-to-cart" type="submit">
                                    Add to cart
                                </button>
                            </form>

And just replaced $token with $static_token

×
×
  • Create New...