<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Save Prestashop Custom fields on &#8220;Add to cart&#8221; &#8211; Part 1</title>
	<atom:link href="http://nemops.com/save-prestashop-custom-fields-add-to-cart/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Fri, 10 Mar 2023 23:25:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>By: facebook.com/planB4fashion</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46819</link>
		<dc:creator><![CDATA[facebook.com/planB4fashion]]></dc:creator>
		<pubDate>Fri, 15 Nov 2019 10:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46819</guid>
		<description><![CDATA[You could try the updated version of 1.6 called Thirtybees. It comes with some features free that are paid-for on Prestashop 1.7]]></description>
		<content:encoded><![CDATA[<p>You could try the updated version of 1.6 called Thirtybees. It comes with some features free that are paid-for on Prestashop 1.7</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46617</link>
		<dc:creator><![CDATA[Leo]]></dc:creator>
		<pubDate>Thu, 07 Sep 2017 14:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46617</guid>
		<description><![CDATA[It seems that this tutorial is outdated for prestashop 1.7 :/]]></description>
		<content:encoded><![CDATA[<p>It seems that this tutorial is outdated for prestashop 1.7 :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Makina Nero</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46601</link>
		<dc:creator><![CDATA[Makina Nero]]></dc:creator>
		<pubDate>Mon, 17 Jul 2017 14:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46601</guid>
		<description><![CDATA[You should add async:false in your code ! I use this trick for the second time and it didn&#039;t work ! I compared the code on the first site I made using this trick and the only difference was the use of async:false. Even if you tell to use it, it should be in the example...]]></description>
		<content:encoded><![CDATA[<p>You should add async:false in your code ! I use this trick for the second time and it didn&#8217;t work ! I compared the code on the first site I made using this trick and the only difference was the use of async:false. Even if you tell to use it, it should be in the example&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marek Z</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46486</link>
		<dc:creator><![CDATA[Marek Z]]></dc:creator>
		<pubDate>Sat, 31 Dec 2016 00:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46486</guid>
		<description><![CDATA[It is work but interpretation of instruction can make problem. Code in ajax-cart.js must stay. Custom code from trutorial must be add after  all if (addedFromProductPage &amp;&amp; !checkCustomizations()) {};
CODE:
add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist) {
    if (addedFromProductPage &amp;&amp; !checkCustomizations()) {
      if (contentOnly) {
        var productUrl = window.document.location.href + &#039;&#039;;
        var data = productUrl.replace(&#039;content_only=1&#039;, &#039;&#039;);
        window.parent.document.location.href = data;
        return;
      }

      if (!!$.prototype.fancybox) {
        $.fancybox.open([
          {
            type: &#039;inline&#039;,
            autoScale: true,
            minHeight: 30,
            content: &#039;&#039; + fieldRequired + &#039;&#039;
          }
        ], {
          padding: 0
        });
      } else {
        alert(fieldRequired);
      }
      return;
    }

    if(addedFromProductPage &amp;&amp; $(&#039;#customizationForm&#039;).length &gt; 0)
    {

	  $(&#039;#quantityBackup&#039;).val($(&#039;#quantity_wanted&#039;).val());
	  customAction = $(&#039;#customizationForm&#039;).attr(&#039;action&#039;);
	  $(&#039;body select[id^=&quot;group_&quot;]&#039;).each(function() {
		customAction = customAction.replace(new RegExp(this.id + &#039;=\d+&#039;), this.id +&#039;=&#039; + this.value);
	  });
	  // ajax to product page with custom action
	  var customization_entries = $(&#039;#customizationForm&#039;).serialize();
	  $.ajax({
		type: &#039;POST&#039;,
		async:false,
		data: customization_entries+ &#039;&amp;ajax=1&#039;,
		dataType: &#039;json&#039;,
		url: customAction,
		success: function(data){

		    if(typeof(data.errors) !== &#039;undefined&#039;)
		    {
			  alert(&#039;Error while saving customization data&#039;);
			  return;
		    }

		}
	  })
    }

....... cdn

}]]></description>
		<content:encoded><![CDATA[<p>It is work but interpretation of instruction can make problem. Code in ajax-cart.js must stay. Custom code from trutorial must be add after  all if (addedFromProductPage &amp;&amp; !checkCustomizations()) {};<br />
CODE:<br />
add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist) {<br />
    if (addedFromProductPage &amp;&amp; !checkCustomizations()) {<br />
      if (contentOnly) {<br />
        var productUrl = window.document.location.href + &#8221;;<br />
        var data = productUrl.replace(&#8216;content_only=1&#8242;, &#8221;);<br />
        window.parent.document.location.href = data;<br />
        return;<br />
      }</p>
<p>      if (!!$.prototype.fancybox) {<br />
        $.fancybox.open([<br />
          {<br />
            type: &#8216;inline&#8217;,<br />
            autoScale: true,<br />
            minHeight: 30,<br />
            content: &#8221; + fieldRequired + &#8221;<br />
          }<br />
        ], {<br />
          padding: 0<br />
        });<br />
      } else {<br />
        alert(fieldRequired);<br />
      }<br />
      return;<br />
    }</p>
<p>    if(addedFromProductPage &amp;&amp; $(&#8216;#customizationForm&#8217;).length &gt; 0)<br />
    {</p>
<p>	  $(&#8216;#quantityBackup&#8217;).val($(&#8216;#quantity_wanted&#8217;).val());<br />
	  customAction = $(&#8216;#customizationForm&#8217;).attr(&#8216;action&#8217;);<br />
	  $(&#8216;body select[id^=&#8221;group_&#8221;]&#8217;).each(function() {<br />
		customAction = customAction.replace(new RegExp(this.id + &#8216;=\d+&#8217;), this.id +&#8217;=&#8217; + this.value);<br />
	  });<br />
	  // ajax to product page with custom action<br />
	  var customization_entries = $(&#8216;#customizationForm&#8217;).serialize();<br />
	  $.ajax({<br />
		type: &#8216;POST&#8217;,<br />
		async:false,<br />
		data: customization_entries+ &#8216;&amp;ajax=1&#8242;,<br />
		dataType: &#8216;json&#8217;,<br />
		url: customAction,<br />
		success: function(data){</p>
<p>		    if(typeof(data.errors) !== &#8216;undefined&#8217;)<br />
		    {<br />
			  alert(&#8216;Error while saving customization data&#8217;);<br />
			  return;<br />
		    }</p>
<p>		}<br />
	  })<br />
    }</p>
<p>&#8230;&#8230;. cdn</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priyanshu Khandelwal</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46422</link>
		<dc:creator><![CDATA[Priyanshu Khandelwal]]></dc:creator>
		<pubDate>Fri, 30 Sep 2016 10:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46422</guid>
		<description><![CDATA[how is it working in ur case, I can&#039;t implement it. Please explain this]]></description>
		<content:encoded><![CDATA[<p>how is it working in ur case, I can&#8217;t implement it. Please explain this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priyanshu Khandelwal</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46421</link>
		<dc:creator><![CDATA[Priyanshu Khandelwal]]></dc:creator>
		<pubDate>Fri, 30 Sep 2016 10:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46421</guid>
		<description><![CDATA[Please explain me. Its not working for me . Mail me at priyanshu270@gmail.com]]></description>
		<content:encoded><![CDATA[<p>Please explain me. Its not working for me . Mail me at <a href="mailto:priyanshu270@gmail.com">priyanshu270@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priyanshu Khandelwal</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46420</link>
		<dc:creator><![CDATA[Priyanshu Khandelwal]]></dc:creator>
		<pubDate>Fri, 30 Sep 2016 10:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46420</guid>
		<description><![CDATA[Its not working for me, Please somebody help.]]></description>
		<content:encoded><![CDATA[<p>Its not working for me, Please somebody help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46410</link>
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sat, 10 Sep 2016 10:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46410</guid>
		<description><![CDATA[i tried it four times already, would you mind uploading the files so i can take a look at the to see if i miss something. Also i noticed that in your demo web it does not work.]]></description>
		<content:encoded><![CDATA[<p>i tried it four times already, would you mind uploading the files so i can take a look at the to see if i miss something. Also i noticed that in your demo web it does not work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NemoPS</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46409</link>
		<dc:creator><![CDATA[NemoPS]]></dc:creator>
		<pubDate>Sat, 10 Sep 2016 08:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46409</guid>
		<description><![CDATA[Hard to tell at first glance, I used it myself last week on the same version and it worked like a charm, did you clear cache after creating the php override?]]></description>
		<content:encoded><![CDATA[<p>Hard to tell at first glance, I used it myself last week on the same version and it worked like a charm, did you clear cache after creating the php override?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://nemops.com/save-prestashop-custom-fields-add-to-cart/comment-page-1/#comment-46408</link>
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Wed, 07 Sep 2016 10:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=2390#comment-46408</guid>
		<description><![CDATA[I have the version 1.6.1.6, followed the tutorial but it does not work at all. In my theme i dont have ajaxcart.js, so i edited it directly in the modulesof the prestashop.
So i did all the steps first in ajax-cart.js:
add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, wishlist){
		if (addedFromProductPage &amp;&amp; !checkCustomizations())
		{
			alert(fieldRequired);
			return ;
		}
		emptyCustomizations();
		if(addedFromProductPage &amp;&amp; $(&#039;#customizationForm&#039;).length &gt; 0)
{
 
    $(&#039;#quantityBackup&#039;).val($(&#039;#quantity_wanted&#039;).val());
    customAction = $(&#039;#customizationForm&#039;).attr(&#039;action&#039;);
    $(&#039;body select[id^=&quot;group_&quot;]&#039;).each(function() {
        customAction = customAction.replace(new RegExp(this.id + &#039;=\d+&#039;), this.id +&#039;=&#039; + this.value);
    });
    // ajax to product page with custom action
    var customization_entries = $(&#039;#customizationForm&#039;).serialize();
    $.ajax({
        type: &#039;POST&#039;,
        data: customization_entries+ &#039;&amp;ajax=1&#039;,
        dataType: &#039;json&#039;,
        url: customAction,
        success: function(data){
            if(typeof(data.errors) !== &#039;undefined&#039;)
            {
                alert(&#039;Error while saving customization data&#039;);
                return;
            }
                 
        }
    })  
}
and in the line 200
//send the ajax request to the server
		$.ajax({
			type: &#039;POST&#039;,
			headers: { &quot;cache-control&quot;: &quot;no-cache&quot; },
			url: baseUri + &#039;?rand=&#039; + new Date().getTime(),
			async: false,
			cache: false,

The followed the other tutorial files and did as you wrote, but still not working, any idea?]]></description>
		<content:encoded><![CDATA[<p>I have the version 1.6.1.6, followed the tutorial but it does not work at all. In my theme i dont have ajaxcart.js, so i edited it directly in the modulesof the prestashop.<br />
So i did all the steps first in ajax-cart.js:<br />
add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, wishlist){<br />
		if (addedFromProductPage &amp;&amp; !checkCustomizations())<br />
		{<br />
			alert(fieldRequired);<br />
			return ;<br />
		}<br />
		emptyCustomizations();<br />
		if(addedFromProductPage &amp;&amp; $(&#8216;#customizationForm&#8217;).length &gt; 0)<br />
{</p>
<p>    $(&#8216;#quantityBackup&#8217;).val($(&#8216;#quantity_wanted&#8217;).val());<br />
    customAction = $(&#8216;#customizationForm&#8217;).attr(&#8216;action&#8217;);<br />
    $(&#8216;body select[id^=&#8221;group_&#8221;]&#8217;).each(function() {<br />
        customAction = customAction.replace(new RegExp(this.id + &#8216;=\d+&#8217;), this.id +&#8217;=&#8217; + this.value);<br />
    });<br />
    // ajax to product page with custom action<br />
    var customization_entries = $(&#8216;#customizationForm&#8217;).serialize();<br />
    $.ajax({<br />
        type: &#8216;POST&#8217;,<br />
        data: customization_entries+ &#8216;&amp;ajax=1&#8242;,<br />
        dataType: &#8216;json&#8217;,<br />
        url: customAction,<br />
        success: function(data){<br />
            if(typeof(data.errors) !== &#8216;undefined&#8217;)<br />
            {<br />
                alert(&#8216;Error while saving customization data&#8217;);<br />
                return;<br />
            }</p>
<p>        }<br />
    })<br />
}<br />
and in the line 200<br />
//send the ajax request to the server<br />
		$.ajax({<br />
			type: &#8216;POST&#8217;,<br />
			headers: { &#8220;cache-control&#8221;: &#8220;no-cache&#8221; },<br />
			url: baseUri + &#8216;?rand=&#8217; + new Date().getTime(),<br />
			async: false,<br />
			cache: false,</p>
<p>The followed the other tutorial files and did as you wrote, but still not working, any idea?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
