Add-to-cart form duplicated after ajax call (size or color selection)

paradoxx's picture
paradoxx
Thu, 12/10/2015 - 14:26
#1
Add-to-cart form duplicated after ajax call (size or color selection)

Hi,

It looks i'll be needing some of your support again, with a weird phenomenon occurring randomly on some product node pages.

In the below screenshot you can witness there are 2 add-to-box div's visible :

Image title

The second box starts showing up after selecting some other size or color, so after the ajax call to refresh the add-to-cart form.

In the page inspect on the left you can see they are idential, so it looks like the replacement done by ajax callback has not gone well.

The weird thing about this is the fact this is not occurring for all products in my catalog.

On these pages it looks ok : 

http://couture2.artstanding.be/product/clone-party-hat-cushion

http://couture2.artstanding.be/product/skinny-tiger-camo

On this page not :

http://couture2.artstanding.be/product/oakley-scrap-metal-tee

The last two mentioned are even products from your install profile and hasn't been changed since installation.

This is a new product i created from scratch on my live site and also suffering from this symptom : 

http://couture2.rawdesk.be/product/test-new-product

Also note that on faulty pages on initial load the + and - beside QTY field are not functioning. Only after ajax refresh, the above (inserted) +/- buttons are working.

I don't have a clue what is going wrong. Searched for hours to find a pattern in the faulty cases but no luck :(

Any chance te receive some assistance in this ?

Thanks!

cindy's picture
cindy
Fri, 12/11/2015 - 03:28

Hi,

We will check your problem and respond you asap

paradoxx's picture
paradoxx
Fri, 12/11/2015 - 04:30

OK thanks! I am also reverting a backup to a new subdomain to drill down to some recent changes made in commerce-add-to-cart-form.tpl.

paradoxx's picture
paradoxx
Fri, 12/11/2015 - 14:17

Hi, 

As somehow predicted in my previous private message, i narrowed the cause for this issue to the by css hidden attributes form.

Applying these rather 'onorthodox' changes to the commerce-add-to-cart-form, solved the issue for all my product nodes :

Image title

1. added an input element with id and name setted as expected by the ajax js routine and styled it hidden via CSS

2. html commented out the hidden attributes form rendering as shown above

Giving me this result :

Image title

 Attention: removing form attributes rendering section still causes page layout issues ! See example below :

Image title

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.