![]() #11 does not work if you don't have at least 2 product variations, then $form_data returns undefined. I also believe the default UX (with the price above variations, or below add to cart), is a mess. It is necessary to call he buildEntity by hand method and use the returned object instead the instance once, because the instance once references to the default product variation instead of the currently selected one! This places the price field directly over the add to cart button. Then i position the price div into that space. Using a top margin i created some space above the add-to-cart-button. Commerce regenerates this form in order to update all the variation fields. However when the user starts changing variation fields the containing form gets removed along with the price. ![]() form-actions") Īt first glance this works. ![]() field-type-commerce-price").insertBefore(".commerce-order-item-add-to-cart-form. I am not able to decompose it into seperate fields.įor solution #3 i tried moving the price div to the right location using jQuery, like this: $("article. The variation fields and add-to-cart-button are packed together in "product.variations" as one placeholder. Solution #1 did not work out because the variation fields (color and size in this example) and the add-to-cart-button appear to be packed together as "Variations" in the product type settings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |