I would love to add a discount for a particular payment method. Anybody have any ideas about how to do such a thing?
Audra
I would love to add a discount for a particular payment method. Anybody have any ideas about how to do such a thing?
Audra
look in the old downloads, there is a module to do just that
Zen cart PCI compliant Hosting
Thank you Merlin! I found it here:
http://www.zen-cart.com/archived_con...e_discount.zip
Best,
Audra
I have installed this mod and received this error when trying to checkout:
Call to a member function get_products() on a non-object in /home/naturew/public_html/tip_top/includes/modules/order_total/ot_payment.php on line 80
Here is the code surrounding line 80:
Guessing this has something to do w/ updated Zen code.Code:// Check if gift voucher is in cart and adjust total $products = $cart->get_products(); for ($i=0; $i<sizeof($products); $i++) { $t_prid = zen_get_prid($products[$i]['id']); $gv_result = $db->Execute("select products_price, products_tax_class_id, products_model from " . TABLE_PRODUCTS . " where products_id = '" . $t_prid . "'");
Any guesses?
Oh, I guess I should add that the error occurs during step two of the checkout process, Payment, under the heading Your Total.
Thanks!
Audra
Oh, I don't care about Paypal. That was someone else who started this thread a while back.
I want to use this mod to give a discount to customers that pay by cash or check.
(Moderator: All the more reason to start new threads, rather than change topics on old ones... ... splitting this discussion to a new topic...)Originally Posted by audradh
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hi, anyone can help on this ancient module to work with 1.3x? Really need it badly.
I have been running this module for about a year and actually using it to charge a surcharge for credit cards. I have only just discovered that it has a problem.
I get a similar error, it seems that this is old code adapted from OS Commerce.
I have only just got around to setting up Gift certificates and that's the only time I have found a problem with this order payment module. Here's my error:
I hope somebody can help with a fix because I can't get the gift certificates up and running until this is sorted.Fatal error: Call to a member function on a non-object in /hsphere/local/home/waycool/waycool.com.au/includes/modules/order_total/ot_payment.php on line 92
Here is what I think is the offending code.
// Check if gift voucher is in cart and adjust total
$products = $_SESSION['cart']->get_products();
for ($i=0; $i<sizeof($products); $i++) {
$t_prid = zen_get_prid($products[$i]['id']);
$gv_result = $db->Execute("select products_price, products_tax_class_id, products_model from " . TABLE_PRODUCTS . " where products_id = '" . $t_prid . "'");
//$gv_result = zen_db_fetch_array($gv_query);
if (ereg("^GIFT", addslashes($gv_result->fields['products_model']))) {
$qty = $cart->get_quantity($t_prid);
$products_tax = zen_get_tax_rate($gv_result->fields['products_tax_class_id']);
if ($this->include_tax =='false') {
$gv_amount = $gv_result->fields['products_price'] * $qty;
} else {
$gv_amount = ($gv_result->fields['products_price'] + zen_calculate_tax($gv_result->fields['products_price'],$products_tax)) * $qty;
}
$order_total=$order_total - $gv_amount;
}
}
Oh sorry, I forgot to say that this is line 92
$qty = $cart->get_quantity($t_prid);
Bookmarks