title: minicart js - add to cart opening on new tab
body: <p>I am trying to add minicart js to the website I am building but I appear to be having some issue.</p>
  <p>With reference to <a href="https://stackoverflow.com/questions/24022762/view-paypal-shopping-cart-contents-on-my-site">this</a> question, the accepted answer links a demo which opens a mini cart GUI when the add to cart button is pressed.</p>
  <p>However, when I inspect element and copy the exact code used in the demo into my editor and run the page, when I press add to cart, paypal opens on another page, rather than displaying the mini cart.</p>
  <p>I have been trying different versions to see if it mattered (3.0.6 is the latest) but having the same issue.</p>
  <p>I would just like the mini cart to display on my page.</p>
  <h1>EDIT</h1>
  <p>I've found another post which said to remove the code protection which apparently worked for another user but unfortunately did not work for me, I'm at a loss as to why the minicart window won't display.</p>
  <p>This is the code I am using which works for the demo but not for my page:</p>
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;form target=&quot;paypal&quot; action=&quot;https://www.sandbox.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot; &gt;
      &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_cart&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;demo@gmail.com&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;lc&quot; value=&quot;US&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;test Add to Cart&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;12.00&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;https://www.paypaltech.com/vimal/test.php&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;add&quot; value=&quot;1&quot;&gt;
      &lt;input type=&quot;hidden&quot; name=&quot;bn&quot; value=&quot;PP-ShopCartBF:btn_cart_LG.gif:NonHosted&quot;&gt;
      &lt;input type=&quot;image&quot; src=&quot;https://www.sandbox.paypal.com/en_US/i/btn/btn_cart_LG.gif&quot; border=&quot;0&quot; name=&quot;submit&quot; alt=&quot;PayPal - The safer, easier way to pay online!&quot;&gt;
      &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;
  &lt;/form&gt;
  
  &lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/minicart/3.0.3/minicart.min.js&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
      paypal.minicart.render();
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>