Jump to content



Member Since 08 Dec 2014
Offline Last Active Mar 17 2016 11:05 AM

Posts I've Made

In Topic: Add A Product To The Cart Using A Link

29 February 2016 - 03:05 PM

No luck. I have also tried on an older cs-cart version, but it doesn't work for me.

In Topic: Add A Product To The Cart Using A Link

29 February 2016 - 09:34 AM

Hi thank you for the effort you put to solve the issue, but it doesn't work for me.

I have used a block with smarty support and just changed the product code, and basically I have the same behaviour as before.

The number of products in the cart is not updated, even if the product has been added.

Does it works for you ?

In Topic: Add A Product To The Cart Using A Link

26 February 2016 - 11:06 AM

I  noticed that there are some other relevant fields, but I don't know how to add them to the href link.


The most interesting are:


<input type="hidden" name="appearance[show_add_to_cart]" value="1" />

<input type="hidden" name="result_ids" value="cart_status*,wish_list*,checkout*,account_info*" />


I have tried something like this but doesn't work. Keeps on adding the prodcut to the cart but it doesn't refresh the number of contained items.


<a href="{"checkout.add..1"|fn_url}&result_ids=cart_status*,wish_list*,checkout*,account_info*&appearance[show_add_to_cart]=1" class="cm-post cm-ajax">NEW LINK</a>


Here the complete form


<form action="http://localhost/projects/rf_shop2/"method="post" name="product_form_1" enctype="multipart/form-data" class="cm-disable-empty-files  cm-ajax cm-ajax-full-render cm-ajax-status-middle ">
<input type="hidden" name="result_ids" value="cart_status*,wish_list*,checkout*,account_info*" />
<input type="hidden" name="redirect_url" value="index.html?dispatch=categories.view&amp;category_id=3" />
<input type="hidden" name="product_data[1][product_id]" value="1" />
<div class="ty-grid-list__image" id="container_id_1"><div class="quick-add" id="add_to_cart_1"><div class="cm-reload-1 " id="add_to_cart_update_1">
<input type="hidden" name="appearance[show_add_to_cart]" value="1" />
<input type="hidden" name="appearance[show_list_buttons]" value="" />
<input type="hidden" name="appearance[but_role]" value="action" />
<input type="hidden" name="appearance[quick_view]" value="" />
<button id="button_cart_1" class="ty-btn__primary ty-btn__big ty-btn__add-to-cart cm-form-dialog-closer ty-btn" type="submit" name="dispatch[checkout.add..1]" >Add to cart</button>

In Topic: Add A Product To The Cart Using A Link

26 February 2016 - 10:33 AM


using a html block with Smarty support, the add to cart modal window appear, but the cart doesn't update (the number of itmes in the cart doesn't change) until I manually refresh the page.

Seems that the product is added correctly to the cart, but the cart content is not refreshed.

In Topic: Add A Product To The Cart Using A Link

24 February 2016 - 10:02 AM


thank you for your help.

The link is used inside an html block.

I have tried all these options but none of them works


<a href="{checkout.add..1|fn_url}" class="cm-post cm-ajax">PRODUCT LINK</a>

 <a href="{'checkout.add..1'|fn_url}" class="cm-post cm-ajax">{__('add_to_cart')}</a>
 <a href="{checkout.add..1|fn_url}" class="cm-post cm-ajax">{__('add_to_cart')}</a>
 <a href="{"checkout.add..1"|fn_url}" class="cm-post cm-ajax">{__('add_to_cart')}</a>


I get these errors depending on which link I click


ErrorOops, something went wrong (Forbidden). Please try again.


POST http://localhost/projects/rf_shop2/%7Bnet::ERR_CONNECTION_RESET

 Sorry the 244 is replaced with 1 that is the actual product code