{"id":1385562,"date":"2017-11-17T07:28:56","date_gmt":"2017-11-17T15:28:56","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/"},"modified":"2017-11-17T07:28:56","modified_gmt":"2017-11-17T15:28:56","slug":"incorrect-tickets-left-count","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/","title":{"rendered":"Incorrect tickets left count"},"content":{"rendered":"<p>Hi, since last updates our tickets left count don\u00b4t work fine.<\/p>\n<p>For example:<br \/>\n<a href=\"http:\/\/www.tourgalia.com\/evento\/quirogatrailchallenge\/\">http:\/\/www.tourgalia.com\/evento\/quirogatrailchallenge\/<\/a><\/p>\n<p>If you select one ticket all counters update with the same number.<\/p>\n<p><strong>Note: <\/strong>We have a function to limit one ticket per person but if we deactivate this function the error continues.<\/p>\n<p>FUNCTION:<\/p>\n<pre><code>function tribe_limit_tickets() { \n\t?&gt;\n    \n    &lt;script type=&quot;text\/javascript&quot;&gt;\n    \tjQuery(document).ready( function( $ ) {\n    \t\t\/\/ do this if tickets available\n    \t\tif ( $(&#039;.available-stock&#039;).length ) {\n    \t\t\t\/\/ set max qty to 2\n    \t\t\t$(&#039;.tribe-events-tickets .qty&#039;).attr(&#039;max&#039;, 1);\n    \t\t\t\/\/ run on input change\n    \t\t\t$(&#039;.tribe-events-tickets .qty&#039;).change ( function ( ) {\n    \t\t\t\t\/\/ don&#039;t run the manually triggered change event\n    \t\t\t\tif ( $(this).val() == 0 ) return;\n    \t\t\t\t\/\/ make sure it&#039;s not more than 2\n    \t\t\t\tif ( $(this).val() &gt; 1 ) $(this).val(2);\n    \t\t\t\t\/\/ change all inputs but this to 0\n    \t\t\t\t\/\/ manually trigger the change event so available stock gets updated\n    \t\t\t\t$(&#039;.tribe-events-tickets .qty&#039;).not( $(this) ).val(0).change();\n    \t\t\t});\n    \t\t\t\/\/ add a oninput event\n    \t\t\t$(&#039;.tribe-events-tickets .qty&#039;).on(&#039;input&#039;, function (e) {\n    \t\t\t\t$(this).change();\n    \t\t\t});\n    \t\t}\n    \t});\n    &lt;\/script&gt;\n\n    &lt;?php\n}\nadd_action(&#039;wp_head&#039;, &#039;tribe_limit_tickets&#039;);\n<\/code><\/pre>\n<p>Thanks in advance,<\/p>\n<p>Pablo<\/p>\n","protected":false},"template":"","class_list":["post-1385562","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Incorrect tickets left count -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Incorrect tickets left count -\" \/>\n<meta property=\"og:description\" content=\"Hi, since last updates our tickets left count don\u00b4t work fine. For example: http:\/\/www.tourgalia.com\/evento\/quirogatrailchallenge\/ If you select one ticket all counters update with the same number. Note: We have a function to limit one ticket per person but if we deactivate this function the error continues. FUNCTION: function tribe_limit_tickets() { ?&gt; &lt;script type=&quot;text\/javascript&quot;&gt; jQuery(document).ready( function( [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/\",\"name\":\"Incorrect tickets left count -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-11-17T15:28:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Incorrect tickets left count\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Incorrect tickets left count -","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:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/","og_locale":"en_US","og_type":"article","og_title":"Incorrect tickets left count -","og_description":"Hi, since last updates our tickets left count don\u00b4t work fine. For example: http:\/\/www.tourgalia.com\/evento\/quirogatrailchallenge\/ If you select one ticket all counters update with the same number. Note: We have a function to limit one ticket per person but if we deactivate this function the error continues. FUNCTION: function tribe_limit_tickets() { ?&gt; &lt;script type=&quot;text\/javascript&quot;&gt; jQuery(document).ready( function( [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/","name":"Incorrect tickets left count -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-11-17T15:28:56+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/incorrect-tickets-left-count\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Incorrect tickets left count"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1385562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1385562\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1385562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}