{"id":168,"date":"2015-01-22T03:43:30","date_gmt":"2015-01-22T03:43:30","guid":{"rendered":"http:\/\/angelwings.net\/blog\/?p=168"},"modified":"2015-01-22T03:43:30","modified_gmt":"2015-01-22T03:43:30","slug":"oscommerce-quantity-discounts-by-that-software-guy-ccgv-error","status":"publish","type":"post","link":"https:\/\/angelwings.net\/blog\/oscommerce-quantity-discounts-by-that-software-guy-ccgv-error\/","title":{"rendered":"OScommerce: Quantity Discounts by That Software Guy (CCGV error)"},"content":{"rendered":"<p>Source: http:\/\/www.thatsoftwareguy.com\/osc_quantity_discounts.html#CCGV<\/p>\n<p>Q: I am also using the CCGV (Coupon Code\/Gift Voucher) Contribution. On the Checkout Payment Page, I get the error:<\/p>\n<p>&#8220;Fatal error: Call to undefined method ot_quantity_discount::use_credit_amount() in<br \/>\n&#8230;&#8230;..\/httpdocs\/includes\/classes\/order_total.php on line nnn&#8221;<\/p>\n<p>A: Make the following fix to the file includes\/classes\/order_total.php.<br \/>\nChange<\/p>\n<p>if ($GLOBALS[$class]-&gt;enabled &amp;&amp; $GLOBALS[$class]-&gt;credit_class)<\/p>\n<p>to<\/p>\n<p>if ($GLOBALS[$class]-&gt;enabled &amp;&amp; $GLOBALS[$class]-&gt;credit_class<br \/>\n&amp;&amp; (method_exists($GLOBALS[$class], &#8216;use_credit_amount&#8217;)))<\/p>\n<p><strong>The location of this line will depend on how many changes you&#8217;ve made to the file order_total.php. <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: http:\/\/www.thatsoftwareguy.com\/osc_quantity_discounts.html#CCGV Q: I am also using the CCGV (Coupon Code\/Gift Voucher) Contribution. On the Checkout Payment Page, I get the error: &#8220;Fatal error: Call to undefined method ot_quantity_discount::use_credit_amount() in &#8230;&#8230;..\/httpdocs\/includes\/classes\/order_total.php on line nnn&#8221; A: Make the following fix to the file includes\/classes\/order_total.php. Change if ($GLOBALS[$class]-&gt;enabled &amp;&amp; $GLOBALS[$class]-&gt;credit_class) to if ($GLOBALS[$class]-&gt;enabled &amp;&amp; $GLOBALS[$class]-&gt;credit_class &amp;&amp; (method_exists($GLOBALS[$class], [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[92],"class_list":["post-168","post","type-post","status-publish","format-standard","hentry","category-ecommerce","tag-oscommerce"],"_links":{"self":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":0,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"wp:attachment":[{"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angelwings.net\/blog\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}