Martin C Posted September 7, 2014 Share Posted September 7, 2014 Some help is required i have an attribute when this attribute is set to yes then i want to display the customize fields if set to no(default) then hide the customize fields. Is there somebody who can point me to some examples or code snippet? Link to comment Share on other sites More sharing options...
Kimi Posted September 7, 2014 Share Posted September 7, 2014 You mean you have some special attribute (I think it would be easier to use product feature for this ) and if his value equals yes, then hide all other attributes in product detail? Link to comment Share on other sites More sharing options...
Martin C Posted September 7, 2014 Author Share Posted September 7, 2014 No i want this to be a attribute in this way i can ask a fee for enter some text in an customize field Link to comment Share on other sites More sharing options...
Kimi Posted September 7, 2014 Share Posted September 7, 2014 So something like this: https://github.com/mittermichal/PrestashopHideCustomizeField/commit/afde524010e0ececee8b080173a3859fb5e7ba5d ? It hides customization tab when product got attribute called "Hide Customize" with value "yes" now it wouldn't work if some customization field would be requierd Link to comment Share on other sites More sharing options...
Martin C Posted September 8, 2014 Author Share Posted September 8, 2014 That is exactly what i need, thank you very much for pointing me to this resource! Link to comment Share on other sites More sharing options...
Martin C Posted September 8, 2014 Author Share Posted September 8, 2014 I tried your github example but this is not working. When a webshop visitor is selecting a attribute in the shop then the $group.name is always array. I want it done this way: when a customer select a pulldown "Yes i want an engraving" then the customize fields must be active of course this fields must be set non mandatory. By default the pulldown on the product page is set to "No i do not want an engraving" and the customize fields are hidden. Thank you very much for you help! Link to comment Share on other sites More sharing options...
Kimi Posted September 8, 2014 Share Posted September 8, 2014 I finally understand how you want it. https://github.com/mittermichal/PrestashopHideCustomizeField/commit/79efe07646d433b9dae411b21413fdbef16f83bb in product.tpl change {assign var="hide_attribute_name" value="Hide Customize"} to your value. In product.js change number 22 at line 730 to your value, which you can find here: Link to comment Share on other sites More sharing options...
Martin C Posted September 9, 2014 Author Share Posted September 9, 2014 Thanks for the post really helpful! I just send you a PM Link to comment Share on other sites More sharing options...
Dawn Posted November 4, 2014 Share Posted November 4, 2014 Hi, i'm searching this for a long time. I prove the second code but it makes no effect to my shop, the customization field continues to appear. How resolve it? Thanks Link to comment Share on other sites More sharing options...
Dawn Posted November 4, 2014 Share Posted November 4, 2014 Doesn't matters, i solve my questio by myself, thanks anyway Link to comment Share on other sites More sharing options...
Recommended Posts