{"id":235,"date":"2020-02-28T16:01:47","date_gmt":"2020-02-28T16:01:47","guid":{"rendered":"http:\/\/wiki2.plumserver.com\/knowledge-base\/magento-ajax-cart-v1-x-developers-guide-and-api-reference"},"modified":"2021-09-24T08:15:12","modified_gmt":"2021-09-24T12:15:12","slug":"magento-ajax-cart-v1-x-developers-guide-and-api-reference","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide","title":{"rendered":"Magento 1 Ajax Cart v1.x Developer Guide and API Reference"},"content":{"rendered":"\n<p>In this developer documentation for the&nbsp;<a href=\"\/magento-1-ajax-cart\">Magento Ajax Cart Extension<\/a>, you will find step-by-step instructions, sample code, and API references to fully customize your plugin.<\/p>\n\n\n\n<h2 id=\"adding-ajax-cart-functionality-manually\">Adding Ajax Cart functionality manually<\/h2>\n\n\n\n<p>Components of this magento ajax add to cart extension can be implemented manually, by adding buttons in according places of your store. In case you want to add this module&#8217;s functionality manually &#8211; you will need to modify the code.<\/p>\n\n\n\n<h3>Implementing Ajax &#8220;Add to Cart&#8221; button on product page<\/h3>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-columns table-to-grid\">\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Changes to be made<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Website Frontend &#8211; Product Page<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>The following code can be pasted into the product page. The code is as follows:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;button type=\"button\" title=\"&lt;?php echo $this->__('Add to Cart') ?>\"\n    class=\"pac-button pac-product-button p-border-box ajaxcart-el pac-btn-cart\n        pac-btn-cart-{PRODUCT_ID}\" onclick=\"ajaxCart.addProductByForm(this.form);\">\n            &lt;span class=\"pac-label\">\n                &lt;span class=\"pac-helper\">&lt;\/span>\n                &lt;span class=\"pac-number\">&lt;\/span>\n                &lt;img class=\"pac-icon\" width=\"25\" height=\"23\"\n                    src=\"&lt;?php echo $this->getSkinUrl(\n                        'images\/plumrocket\/ajaxcart\/pac-cart-icon.png');?>\" alt=\"\">\n                &lt;img class=\"pac-loader\" width=\"22\" height=\"22\"\n                    src=\"&lt;?php echo $this->getSkinUrl(\n                        'images\/plumrocket\/ajaxcart\/pac-loader.gif');?>\" alt=\"\">\n            &lt;\/span>\n            &lt;?php echo $this->__('Add to Cart') ?>\n&lt;\/button><\/code><\/pre><\/div>\n\n\n\n<p>where &#8220;PRODUCT_ID&#8221; is the ID of the needed product.<\/p>\n\n\n\n<p><div class=\"example-block\">\n<p class=\"example-block-title\">Code Example<\/p>\n\n<p>Edit the file:<\/p>\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-\">\/app\/design\/frontend\/THEME_NAME\/default\/template\/catalog\/product\/view.phtml<\/code><\/pre><\/div>\n\n<p>where &#8220;THEME_NAME&#8221; is the name of the theme you are using.<\/p>\n\n<p>Paste the highlighted code below. The result will be as follows:<\/p>\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre data-line=\"7-11\"><code class=\"language-php\">&lt;form action=\"&lt;?php echo $this-&gt;getSubmitUrl($_product) ?&gt;\" method=\"post\" id=\"product_addtocart_form\"&lt;?php if($_product-&gt;getOptions()): ?&gt; enctype=\"multipart\/form-data\"&lt;?php endif; ?&gt;&gt;\n &lt;?php echo $this-&gt;getBlockHtml('formkey') ?&gt;\n &lt;div class=\"no-display\"&gt;\n &lt;input type=\"hidden\" name=\"product\" value=\"&lt;?php echo $_product-&gt;getId() ?&gt;\" \/&gt;\n &lt;input type=\"hidden\" name=\"related_product\" id=\"related-products-field\" value=\"\" \/&gt;\n &lt;\/div&gt;\n   &lt;button type=\"button\" title=\"&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\" class=\"pac-button pac-product-button p-border-box ajaxcart-el pac-btn-cart pac-btn-cart-&lt;?php echo $_product-&gt;getId() ?&gt;\" onclick=\"ajaxCart.addProductByForm(this.form);\"&gt;\n &lt;span class=\"pac-label\"&gt;\n &lt;span class=\"pac-helper\"&gt;&lt;\/span&gt;&lt;span class=\"pac-number\"&gt;&lt;\/span&gt;&lt;img class=\"pac-icon\" width=\"25\" height=\"23\" src=\"&lt;?php echo $this-&gt;getSkinUrl('images\/plumrocket\/ajaxcart\/pac-cart-icon.png');?&gt;\" alt=\"\"&gt;&lt;img class=\"pac-loader\" width=\"22\" height=\"22\" src=\"&lt;?php echo $this-&gt;getSkinUrl('images\/plumrocket\/ajaxcart\/pac-loader.gif');?&gt;\" alt=\"\"&gt;\n &lt;\/span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\n &lt;\/button&gt;<\/code><\/pre><\/div>\n<\/div><\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<ol><li><strong>Ajax &#8220;Add to Cart&#8221; button on Product page form.<\/strong><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"\/docs\/wp-content\/uploads\/2020\/05\/Adding_ajax_add_to_cart_button_product_form.png\" alt=\"Adding ajax add to cart button product form.png\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<h3>Adding Ajax &#8220;Add to Cart&#8221; button to any template (phtml) file<\/h3>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-columns table-to-grid\">\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Changes to be made<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Website Frontend &#8211; Shopping Cart Page (Cross-sells list)<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>The following code can be pasted and will be working in any template (phtml) file of your theme. The code is as follows:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;button type=\"button\" title=\"&lt;?php echo $this->__('Add to Cart') ?>\"\n    class=\"pac-button p-border-box ajaxcart-el pac-btn-cart pac-btn-cart-{PRODUCT_ID}\"\n    onclick=\"ajaxCart.addProductById({PRODUCT_ID});\">\n        &lt;span class=\"pac-label\">\n            &lt;span class=\"pac-helper\">&lt;\/span>\n            &lt;span class=\"pac-number\">&lt;\/span>\n            &lt;img class=\"pac-icon\" width=\"18\" height=\"17\"\n                src=\"&lt;?php echo $this->getSkinUrl(\n                    'images\/plumrocket\/ajaxcart\/pac-cart-icon.png') ?>\" alt=\"\">\n            &lt;img class=\"pac-loader\" width=\"22\" height=\"22\"\n                src=\"&lt;?php echo $this->getSkinUrl(\n                    'images\/plumrocket\/ajaxcart\/pac-loader.gif');?>\" alt=\"\"\/>\n        &lt;\/span>\n        &lt;?php echo $this->__('Add to Cart') ?>\n&lt;\/button><\/code><\/pre><\/div>\n\n\n\n<p>where &#8220;PRODUCT_ID&#8221; is the ID of the needed product.<\/p>\n\n\n\n<p><div class=\"example-block\">\n    <p class=\"example-block-title\">Code Example<\/p>\n\n    <p>Let&#8217;s edit the &#8220;cross-sells list&#8221; on the shopping cart page:<\/p>\n    \n    <div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-\">\/app\/design\/frontend\/THEME_NAME\/default\/template\/checkout\/cart\/crosssell.phtml<\/code><\/pre><\/div>\n    \n    <p>where &#8220;THEME_NAME&#8221; is the name of the theme you are using.<\/p>\n    \n    <p>Paste the highlighted code below. The result will be as follows:<\/p>\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre data-line=\"32-44\"><code class=\"language-php\">&lt;?php if($this-&gt;getItemCount()): ?&gt;\n    &lt;div class=\"crosssell\"&gt;\n        &lt;h2&gt;&lt;?php echo $this-&gt;__(\n                'Based on your selection, you may be interested in the following items:') ?&gt;\n        &lt;\/h2&gt;\n        &lt;ul id=\"crosssell-products-list\" class=\"products-grid products-grid--max-3-col\"&gt;\n            &lt;?php foreach ($this-&gt;getItems() as $_item): ?&gt;\n            &lt;li class=\"item\"&gt;&lt;a class=\"product-image\" href=\"&lt;?php echo $_item-&gt;getProductUrl() ?&gt;\"\n                    title=\"&lt;?php echo $this-&gt;escapeHtml($_item-&gt;getName()) ?&gt;\"&gt;\n                    &lt;img src=\"&lt;?php echo $this-&gt;helper('catalog\/image')\n                            -&gt;init($_item, 'thumbnail')-&gt;resize(210); ?&gt;\"\n                        alt=\"&lt;?php echo $this-&gt;escapeHtml($_item-&gt;getName()) ?&gt;\" \/&gt;&lt;\/a&gt;\n                &lt;div class=\"product-details\"&gt;\n                    &lt;h3 class=\"product-name\"&gt;&lt;a href=\"&lt;?php echo $_item-&gt;getProductUrl() ?&gt;\"&gt;\n                            &lt;?php echo $this-&gt;escapeHtml($_item-&gt;getName()) ?&gt;&lt;\/a&gt;\n                    &lt;\/h3&gt;\n                    &lt;?php echo $this-&gt;getPriceHtml($_item, true) ?&gt;\n                    &lt;button type=\"button\" title=\"&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\" class=\"button btn-cart\" onclick=\"setLocation(\n                                '&lt;?php echo $this-&gt;getAddToCartUrl($_item) ?&gt;')\"&gt;\n                        &lt;span&gt;\n                            &lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;\/span&gt;\n                        &lt;\/span&gt;\n                    &lt;\/button&gt;\n                    &lt;ul class=\"add-to-links\"&gt;\n                        &lt;?php if ($this-&gt;helper('wishlist')-&gt;isAllow()) : ?&gt;\n                        &lt;li&gt;&lt;a href=\"&lt;?php echo $this-&gt;getAddToWishlistUrl($_item) ?&gt;\"\n                                class=\"link-wishlist\"&gt;&lt;?php echo $this-&gt;__('Add to Wishlist') ?&gt;&lt;\/a&gt;&lt;\/li&gt;\n                        &lt;?php endif; ?&gt;\n                        &lt;?php if($_compareUrl=$this-&gt;getAddToCompareUrl($_item)): ?&gt;\n                        &lt;li&gt;&lt;span class=\"separator\"&gt;|&lt;\/span&gt; &lt;a href=\"&lt;?php echo $_compareUrl ?&gt;\"\n                                class=\"link-compare\"&gt;&lt;?php echo $this-&gt;__('Add to Compare') ?&gt;&lt;\/a&gt;&lt;\/li&gt;\n                        &lt;?php endif; ?&gt;\n                    &lt;\/ul&gt;\n                &lt;\/div&gt;\n                &lt;button type=\"button\" title=\"&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\"\n                    class=\"pac-button p-border-box ajaxcart-el pac-btn-cart pac-btn-cart-&lt;?php echo $_item-&gt;getId() ?&gt;\"\n                    onclick=\"ajaxCart.addProductById(&lt;?php echo $_item-&gt;getId() ?&gt;);\"&gt;\n                    &lt;span class=\"pac-label\"&gt;\n                        &lt;span class=\"pac-helper\"&gt;&lt;\/span&gt;\n                        &lt;span class=\"pac-number\"&gt;&lt;\/span&gt;\n                        &lt;img class=\"pac-icon\" width=\"18\" height=\"17\"\n                            src=\"&lt;?php echo $this-&gt;getSkinUrl('images\/plumrocket\/ajaxcart\/pac-cart-icon.png') ?&gt;\" alt=\"\"&gt;\n                        &lt;img class=\"pac-loader\" width=\"22\" height=\"22\"\n                            src=\"&lt;?php echo $this-&gt;getSkinUrl('images\/plumrocket\/ajaxcart\/pac-loader.gif');?&gt;\" alt=\"\" \/&gt;\n                    &lt;\/span&gt;\n                    &lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\n                &lt;\/button&gt;\n            &lt;\/li&gt;\n            &lt;?php endforeach; ?&gt;\n        &lt;\/ul&gt;\n        &lt;?php \/\/ &lt;script type=\"text\/javascript\"&gt;decorateList('crosssell-products-list', 'none-recursive')&lt;\/script&gt; ?&gt;\n    &lt;\/div&gt;\n    &lt;?php endif; ?&gt;<\/code><\/pre><\/div>\n<\/div><\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<ol><li><strong>Ajax &#8220;Add to Cart&#8221; button in Cross-sells list on Shopping Cart Page.<\/strong><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"\/docs\/wp-content\/uploads\/2020\/05\/Adding_ajax_add_to_cart_button_cross-sells.png\" alt=\"Adding ajax add to cart button cross-sells.png\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<h6 id=\"replacing-view-details-button-with-ajax-add-to-cart-button-in-a-custom-or-default-theme\">Replacing &#8220;View Details&#8221; button with Ajax &#8220;Add to Cart&#8221; button in a custom (or default) theme<\/h6>\n\n\n\n<p>In case your custom theme (or default theme) displays &#8220;View Details&#8221; button after Plumrocket Ajax Cart Magento extension has been installed &#8211; you will need to make some code changes as described below.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-columns table-to-grid\">\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Changes to be made<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Website Frontend &#8211; Product List Page<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>On your server please make the following steps:<\/p>\n\n\n\n<p>1. Locate file:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-\">\/app\/design\/frontend\/THEME_NAME\/default\/template\/catalog\/product\/list.phtml<\/code><\/pre><\/div>\n\n\n\n<p><i>THEME_NAME (Themes Templates) can be found in Magento Admin Panel -&gt; System -&gt; Configuration -&gt; Design -&gt; &#8220;Themes&#8221; tab. If &#8220;Templates&#8221; field is empty &#8211; then template name will be &#8220;default&#8221;.<\/i><\/p>\n\n\n\n<p>2. In the file find the following highlighted code and remove it:<\/p>\n\n\n\n<p><div class=\"example-block\">\n    <p class=\"example-block-title\">Code Example<\/p>\n\n    <div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?php if($_product-&gt;isSaleable() &amp;amp;&amp;amp; !$_product-&gt;canConfigure()): ?&gt;\n        &lt;p class=\"action\"&gt;&lt;button type=\"button\" title=\"&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\"\n            class=\"button btn-cart\" onclick=\"setLocation(\n                '&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;')\"&gt;&lt;span&gt;\n                    &lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/button&gt;\n        &lt;p&gt;\n    &lt;?php elseif($_product-&gt;isSaleable()): ?&gt;\n        &lt;p class=\"action\"&gt;&lt;a title=\"&lt;?php echo $this-&gt;__('View Details') ?&gt;\" class=\"button\"\n            href=\"&lt;?php echo $_product-&gt;getProductUrl() ?&gt;\"&gt;\n                &lt;?php echo $this-&gt;__('View Details') ?&gt;&lt;\/a&gt;\n        &lt;\/p&gt;\n    &lt;?php else: ?&gt;\n        &lt;p class=\"action availability out-of-stock\"&gt;&lt;span&gt;\n            &lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;\/span&gt;\n        &lt;\/p&gt;\n    &lt;?php endif; ?&gt;<\/code><\/pre><\/div>\n<\/div><\/p>\n\n\n\n<p>3. So the code will look like this now:<\/p>\n\n\n\n<p><div class=\"example-block\">\n    <p class=\"example-block-title\">Code Example<\/p>\n\n    <div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?php if($_product-&gt;isSaleable()): ?&gt;\n        &lt;p class=\"action\"&gt;&lt;button type=\"button\" title=\"&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;\"\n            class=\"button btn-cart\" onclick=\"setLocation(\n                '&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;')\"&gt;&lt;span&gt;&lt;span&gt;\n                &lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/button&gt;\n        &lt;\/p&gt;\n    &lt;?php elseif($_product-&gt;isSaleable()): ?&gt;\n        &lt;p class=\"action\"&gt;&lt;a title=\"&lt;?php echo $this-&gt;__('View Details') ?&gt;\"\n            class=\"button\" href=\"&lt;?php echo $_product-&gt;getProductUrl() ?&gt;\"&gt;\n                &lt;?php echo $this-&gt;__('View Details') ?&gt;&lt;\/a&gt;\n        &lt;\/p&gt;\n    &lt;?php else: ?&gt;\n        &lt;p class=\"action availability out-of-stock\"&gt;&lt;span&gt;\n            &lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;\/span&gt;\n        &lt;\/p&gt;\n    &lt;?php endif; ?&gt;<\/code><\/pre><\/div>\n<\/div><\/p>\n\n\n\n<p>4. Save the changed file on your server.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<ol><li><strong>Default &#8220;View Details&#8221; buttons.<\/strong><\/li><li><strong>Ajax &#8220;Add to Cart&#8221; buttons.<\/strong><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"\/docs\/wp-content\/uploads\/2020\/05\/Magento_ajax_cart_replace_default_button_before_after.jpg\" alt=\"Changing Magento Default Buttons to Ajax Buttons\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<p><strong>Please follow the steps described above in case the &#8220;Add to Cart&#8221; button is not displayed on the product list, or it is displayed incorrectly.<\/strong><\/p>\n\n\n\n<p><strong>Note: If the removal of the following line of code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&amp;&amp; !$_product->canConfigure()<\/code><\/pre><\/div>\n\n\n\n<p><strong>does not help &#8211; replace this line of code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-perl\">&lt;?php echo $this->getAddToCartUrl($_product) ?><\/code><\/pre><\/div>\n\n\n\n<p><strong>with this one<\/strong> :<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?php echo $this->helper('checkout\/cart')->getAddUrl($_product) ?><\/code><\/pre><\/div>\n\n\n\n<p><strong>Please, follow the instructions, if ajax &#8220;Add To Cart&#8221; button is not displayed after products auto-load while scrolling on product list page:<\/strong><\/p>\n\n\n\n<p>Find the javascript code that corresponds to products auto-load and modify it in the specific way, so after adding new products html to DOM, run this code:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-javascript\">ajaxCart.onDocumentReady();<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this developer documentation for the&nbsp;Magento Ajax Cart Extension, you will find step-by-step instructions, sample code, and API references to fully customize your plugin. Adding Ajax Cart functionality manually Components of this magento ajax add to cart extension can be implemented manually, by adding buttons in according places of your store. In case you want &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Magento 1 Ajax Cart v1.x Developer Guide and API Reference&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[213],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento Ajax Cart v1.x Developer Guide and API Reference - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"In this developer documentation for the&nbsp;Magento Ajax Cart Extension, you will find step-by-step instructions, sample code, and API references to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 1 Ajax Cart v1.x Developer Guide and API Reference\" \/>\n<meta property=\"og:description\" content=\"In this developer documentation for the&nbsp;Magento Ajax Cart Extension, you will find step-by-step instructions, sample code, and API references to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-28T16:01:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-24T12:15:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2020\/05\/Adding_ajax_add_to_cart_button_product_form.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Magento Ajax Cart v1.x Developer Guide and API Reference - Plumrocket Documentation","description":"In this developer documentation for the&nbsp;Magento Ajax Cart Extension, you will find step-by-step instructions, sample code, and API references to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide","og_locale":"en_US","og_type":"article","og_title":"Magento 1 Ajax Cart v1.x Developer Guide and API Reference","og_description":"In this developer documentation for the&nbsp;Magento Ajax Cart Extension, you will find step-by-step instructions, sample code, and API references to","og_url":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide","og_site_name":"Plumrocket Documentation","article_published_time":"2020-02-28T16:01:47+00:00","article_modified_time":"2021-09-24T12:15:12+00:00","og_image":[{"url":"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2020\/05\/Adding_ajax_add_to_cart_button_product_form.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide#primaryimage","inLanguage":"en-US","url":"\/docs\/wp-content\/uploads\/2020\/05\/Adding_ajax_add_to_cart_button_product_form.png","contentUrl":"\/docs\/wp-content\/uploads\/2020\/05\/Adding_ajax_add_to_cart_button_product_form.png"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide#webpage","url":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide","name":"Magento 1 Ajax Cart v1.x Developer Guide and API Reference - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide#primaryimage"},"datePublished":"2020-02-28T16:01:47+00:00","dateModified":"2021-09-24T12:15:12+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20"},"description":"In this developer documentation for the&nbsp;Magento Ajax Cart Extension, you will find step-by-step instructions, sample code, and API references to","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1\/devguide#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento Extensions","item":"https:\/\/plumrocket.com\/magento-1-extensions"},{"@type":"ListItem","position":2,"name":"Magento Ajax Cart","item":"https:\/\/plumrocket.com\/magento-1-ajax-cart"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart"},{"@type":"ListItem","position":4,"name":"v1","item":"https:\/\/plumrocket.com\/docs\/magento-1-ajax-cart\/v1"},{"@type":"ListItem","position":5,"name":"Developer Guide"}]},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/72392a92ae750c66560be284502b6676?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72392a92ae750c66560be284502b6676?s=96&d=mm&r=g","caption":"Plumrocket"},"sameAs":["https:\/\/plumrocket.com\/docs"]}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/235"}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":2,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"predecessor-version":[{"id":24427,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/235\/revisions\/24427"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}