PrestaShop Attribute Wizard Pro Module can work with transformer theme v4 and panda theme v2 by default. Take the follow steps to make everything works perfectly.
1. Modify the /modules/stshoppingcart/views/templates/hook/stshoppingcart-product-line.tpl file:
Change
1 2 3 | data-down-url="{$product.down_quantity_url}" data-up-url="{$product.up_quantity_url}" data-update-url="{$product.update_quantity_url}" |
To
1 2 3 | data-down-url="{$product.down_quantity_url}&special_instructions={$product.instructions_valid}&special_instructions_id={$product.instructions_id}" data-up-url="{$product.up_quantity_url}&special_instructions={$product.instructions_valid}&special_instructions_id={$product.instructions_id}" data-update-url="{$product.update_quantity_url}&special_instructions={$product.instructions_valid}&special_instructions_id={$product.instructions_id}" |
Change
1 | href="{$product.remove_from_cart_url}" |
To
1 | href="{$product.remove_from_cart_url}&special_instructions={$product.instructions_valid}" |
2. Modify the /modules/attributewizardpro/views/js/awp_product.js file:
Change
1 | $('.blockcart').replaceWith(resp.preview); |
To
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | $('.shoppingcart-list').replaceWith(resp.preview); prestashop.emit('stUpdatedCart'); if(resp.products_count) { if(resp.products_count>9) $('.ajax_cart_quantity').addClass('dozens'); else $('.ajax_cart_quantity').removeClass('dozens'); $('.ajax_cart_quantity').removeClass('lingge').text(resp.products_count); $('.cart_body').removeClass('no_show_empty'); } else { $('.ajax_cart_quantity').removeClass('dozens').addClass('lingge').text(0); hover_display_cp==1 && $('.cart_body').addClass('no_show_empty'); } if(resp.total_value) { $('.ajax_cart_total').text(resp.total_value); } |
That's all. If you know how to use a child theme, then do those modifications in your child theme.
For Transformer v3 and panda theme v1 users.
1. Find this code in the \modules\blockcart_mod\views\templates\hook\blockcart.tpl file.
1 | title="{l s='remove this product from my cart' mod='blockcart_mod'} |
Add this code right along, note there is a space at the beginning.
1 | data-special_instructions="{if isset($product.instructions_valid)}{$product.instructions_valid}{/if}" |
2. Replace this code in the \modules\blockcart_mod\views\js\ajax-cart.js file.
1 | ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery); |
With
1 | ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery+($(this).data('special_instructions') ? '&special_instructions='+$(this).data('special_instructions') : '')); |
Hi!
This adecuations works fine on Attribute Wizard (2.0.4)? The one that is not Pro
https://www.presto-changeo.com/prestashop-17-modules/126-prestashop-attribute-wizard-module.html
Hi !
Thanks for this 1.7 tutorial and greats themes you provide,
Do you have a solution for Panda V1 and Prestashop 1.6.1.24 ?
I'm having trouble with the ajax Cart, and your module Blockcart _mod.
I'm not sure if I should patch Native Blockart, Blockart_mod or both... I think both.. I've tried to, but there are some bugs (delete product, animation to cart ... )
The AWP module say (nothing about blockart_mod):
themes/panda/js/modules/blockcart/ajax-cart.js - Lignes #154, 182-188, 282, 404, 413, 417, 462-483, 507-512, 595, 626-627, 638, 643, 756 (Seulement si vous utilisez le panier AJAX)
/modules/blockcart/blockcart.tpl - Lignes #78-94, 104-109 (Seulement si vous utilisez le panier AJAX)
/modules/blockcart/blockcart-json.tpl - Lignes #31-42, 45, 61-64 (Seulement si vous utilisez le panier AJAX)
So if you could give me a "How to" for 1.6, it will be great ! or give me some help it would be great.
Thanks for your answer.