{"id":787,"date":"2012-05-04T06:34:23","date_gmt":"2012-05-04T06:34:23","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=787"},"modified":"2014-03-19T09:13:52","modified_gmt":"2014-03-19T09:13:52","slug":"jquery-nested-each-paypal-multiple-products-examples-code","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/","title":{"rendered":"JQuery Nested Each, Paypal Multiple Products Examples Code"},"content":{"rendered":"<pre>&lt;form action=\"{paypal_url}\" method=\"post\" id=\"checkout\" name=\"checkout\"&gt;\r\n&lt;!--&lt;input type=\"hidden\" value=\"_xclick\" name=\"cmd\"&gt;--&gt;\r\n&lt;input type=\"hidden\" name=\"cmd\" value=\"_cart\"&gt;\r\n&lt;input type=\"hidden\" name=\"upload\" value=\"1\"&gt;\r\n&lt;input type=\"hidden\" value=\"2\" name=\"rm\"&gt;\r\n&lt;input type=\"hidden\" value=\"{business}\" name=\"business\"&gt;\r\n\r\n&lt;span id=\"products_sale\"&gt;\r\n\r\n&lt;\/span&gt;\r\n\r\n&lt;input type=\"hidden\" name=\"tax_cart\" id=\"tax_cart\" value=\"0\"&gt;\r\n\r\n&lt;input type=\"hidden\" name=\"email\" value=\"{logged_email}\" \/&gt;\r\n&lt;input type=\"hidden\" name=\"first_name\" value=\"{first_name}\" \/&gt;\r\n&lt;input type=\"hidden\" name=\"last_name\" value=\"{last_name}\" \/&gt;\r\n\r\n&lt;input type=\"hidden\" value=\"{currency}\" name=\"currency_code\"&gt;\r\n&lt;input type=\"hidden\" value=\"IC_Sample\" name=\"bn\"&gt;\r\n&lt;input type=\"hidden\" value=\"{image_url}\" name=\"image_url\"&gt;\r\n&lt;input type=\"hidden\" name=\"notify_url\" value=\"{notify_url}\" \/&gt;\r\n&lt;input type=\"hidden\" value=\"{confirm_order}\" name=\"return\"&gt;\r\n\r\n&lt;input type=\"hidden\" value=\"Click here to Confirm Order to {domain_url}\" name=\"cbt\"&gt;\r\n&lt;input type=\"hidden\" value=\"{invoice_no}\" name=\"invoice\"&gt;\r\n&lt;input type=\"hidden\" value=\"{cancel_order}\" name=\"cancel_return\"&gt;\r\n&lt;input type=\"hidden\" name=\"paymentaction\" value=\"sale\" \/&gt;\r\n\r\n&lt;img height=\"50\" width=\"100\" src=\"{submit_btn}\" alt=\"Paypal\" onclick=\"$('#checkout').submit();\" style=\"cursor:pointer;\" \/&gt;\r\n&lt;\/form&gt;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<\/pre>\n<p><strong>Multiple Products List Filling with JQuery in Paypal Form<\/strong><\/p>\n<p>&nbsp;<\/p>\n<pre>\r\n$('.payment').bind(\"mousemove click mouseup\",(function(){\r\n\r\nvar prices_of_tickets = $('.prices_of_tickets');\r\nvar units_of_tickets = $('.units_of_tickets select');\r\n\r\nvar total_price = 0;\r\nvar products_sale = '';\r\nvar product_name = '{event_name}';\r\n\r\n$.each(prices_of_tickets, function(i, item) {\r\n\r\nif(i!='undefined' &amp;&amp; item!='undefined')\r\n{\r\n\r\nvar ticket_price = parseFloat(($(this).html()));\r\nvar ticket_unit = 0;\r\n\r\n$.each(units_of_tickets, function(j, items) {\r\n\r\n\/\/alert(i+'~'+j);\r\nif(j!='undefined' &amp;&amp; item!='undefined' &amp;&amp; i==j)\r\n{\r\n\r\nvar select_id = ($(this).attr('id'));\r\nticket_unit = parseInt($('#'+select_id+' :selected').text());\r\n\r\nvar calc_price = ticket_price*ticket_unit;\r\nvar names_of_tickets = 'Event: '+product_name+', Ticket: '+$('#names_of_tickets_'+(i+1)).html();\r\n\r\ntotal_price+=calc_price;\r\n\r\nif(calc_price&gt;0)\r\n{\r\n$('#put_price_'+(i+1)).html(calc_price);\r\nproducts_sale+='&lt;input type=\"hidden\" name=\"item_name_'+(i+1)+'\" value=\"'+names_of_tickets+'\"&gt;&lt;input type=\"hidden\" name=\"amount_'+(i+1)+'\" value=\"'+calc_price+'\"&gt;&lt;input type=\"hidden\" name=\"quantity_'+(i+1)+'\" value=\"'+ticket_unit+'\"&gt;';\r\n}\r\n}\r\n});\r\n\r\n}\r\n});\r\n\r\n$('#total_price').html(total_price);\r\nvar tax_amount = 0;\r\nif('{currency}'=='CAD')\r\n{\r\ntax_amount = ((total_price*{tax})\/100);\r\n}\r\n\r\n$('#tax_id').html(tax_amount.toFixed(2));\r\n\r\nvar grand_total = tax_amount+total_price;\r\n\r\n$('#grand_price').html(grand_total.toFixed(2));\r\n\r\n$('#tax_cart').val(tax_amount);\r\n$('#products_sale').html(products_sale);\r\n\r\n}));\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;form action=&#8221;{paypal_url}&#8221; method=&#8221;post&#8221; id=&#8221;checkout&#8221; name=&#8221;checkout&#8221;&gt; &lt;!&#8211;&lt;input type=&#8221;hidden&#8221; value=&#8221;_xclick&#8221; name=&#8221;cmd&#8221;&gt;&#8211;&gt; &lt;input type=&#8221;hidden&#8221; name=&#8221;cmd&#8221; value=&#8221;_cart&#8221;&gt; &lt;input type=&#8221;hidden&#8221; name=&#8221;upload&#8221; value=&#8221;1&#8243;&gt; &lt;input type=&#8221;hidden&#8221; value=&#8221;2&#8243; name=&#8221;rm&#8221;&gt; &lt;input type=&#8221;hidden&#8221; value=&#8221;{business}&#8221; name=&#8221;business&#8221;&gt; &lt;span id=&#8221;products_sale&#8221;&gt; &lt;\/span&gt; &lt;input type=&#8221;hidden&#8221; name=&#8221;tax_cart&#8221; id=&#8221;tax_cart&#8221; value=&#8221;0&#8243;&gt; &lt;input type=&#8221;hidden&#8221; name=&#8221;email&#8221; value=&#8221;{logged_email}&#8221; \/&gt; &lt;input type=&#8221;hidden&#8221; name=&#8221;first_name&#8221; value=&#8221;{first_name}&#8221; \/&gt; &lt;input type=&#8221;hidden&#8221; name=&#8221;last_name&#8221; value=&#8221;{last_name}&#8221; \/&gt; &lt;input type=&#8221;hidden&#8221; value=&#8221;{currency}&#8221; name=&#8221;currency_code&#8221;&gt; &lt;input type=&#8221;hidden&#8221; value=&#8221;IC_Sample&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-787","post","type-post","status-publish","format-standard","hentry","category-website-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JQuery Nested Each, Paypal Multiple Products Examples Code<\/title>\n<meta name=\"description\" content=\"JQuery Nested Each, Paypal Multiple Products Examples Code\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JQuery Nested Each, Paypal Multiple Products Examples Code\" \/>\n<meta property=\"og:description\" content=\"JQuery Nested Each, Paypal Multiple Products Examples Code\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-04T06:34:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-19T09:13:52+00:00\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"JQuery Nested Each, Paypal Multiple Products Examples Code\",\"datePublished\":\"2012-05-04T06:34:23+00:00\",\"dateModified\":\"2014-03-19T09:13:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\"},\"wordCount\":18,\"articleSection\":[\"Website Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\",\"name\":\"JQuery Nested Each, Paypal Multiple Products Examples Code\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"datePublished\":\"2012-05-04T06:34:23+00:00\",\"dateModified\":\"2014-03-19T09:13:52+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"JQuery Nested Each, Paypal Multiple Products Examples Code\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JQuery Nested Each, Paypal Multiple Products Examples Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JQuery Nested Each, Paypal Multiple Products Examples Code","description":"JQuery Nested Each, Paypal Multiple Products Examples Code","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:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/","og_locale":"en_US","og_type":"article","og_title":"JQuery Nested Each, Paypal Multiple Products Examples Code","og_description":"JQuery Nested Each, Paypal Multiple Products Examples Code","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2012-05-04T06:34:23+00:00","article_modified_time":"2014-03-19T09:13:52+00:00","author":"Fahad","twitter_misc":{"Written by":"Fahad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"JQuery Nested Each, Paypal Multiple Products Examples Code","datePublished":"2012-05-04T06:34:23+00:00","dateModified":"2014-03-19T09:13:52+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/"},"wordCount":18,"articleSection":["Website Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/","name":"JQuery Nested Each, Paypal Multiple Products Examples Code","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"datePublished":"2012-05-04T06:34:23+00:00","dateModified":"2014-03-19T09:13:52+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"JQuery Nested Each, Paypal Multiple Products Examples Code","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/jquery-nested-each-paypal-multiple-products-examples-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":"JQuery Nested Each, Paypal Multiple Products Examples Code"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":787,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=787"}],"version-history":[{"count":5,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/787\/revisions"}],"predecessor-version":[{"id":1628,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/787\/revisions\/1628"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}