How do I do this? Say, If your order is above $100, then you can pay by COD, else it wont appear, so you can only pay by other methods?
I am using 1.36
How do I do this? Say, If your order is above $100, then you can pay by COD, else it wont appear, so you can only pay by other methods?
I am using 1.36
no quick fix or tweak?
You would need to customize the cod.php and change the $this->enable so that it is only true when the Total >= $XXX.XX ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Hi, I know nuts on php...
which line should I edit?
would the following additional code work?
-------------------------------------------------
// additonal code
if Total >= $100.00 {
$this->enabled = false;
-------------------------------------------------
Pls assist....
You want to try something more like this:
I don't have the "exact" CONSTANT in front of me for the COD shipping part, but you get the idea. You'll want to replace that with the proper one.PHP Code:
if (zen_get_shipping_enabled($this->code) and $total_cart >= 100) {
$this->enabled = ((MODULE_SHIPPING_COD_STATUS == 'True') ? true : false);
}
Last edited by econcepts; 14 Jun 2007 at 03:49 PM. Reason: coding
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
did I miss something?? the COD is still shown?
my code
-----------------------------------
// turn off COD for low value
if (zen_get_shipping_enabled($this->code) and $total_cart >= 50) {
$this->enabled = ((MODULE_SHIPPING_COD_STATUS == 'True') ? true : false);
}
// turn off COD for table
if (substr_count($_SESSION['shipping']['id'], 'table') == 1) {
$this->enabled = false;
}
// disable the module if the order only contains virtual products
if ($this->enabled == true) {
if ($order->content_type != 'physical') {
$this->enabled = false;
}
}
}
-----------------------------------
Hi, what is this MODULE_SHIPPING_COD_STATUS?
Does not appear any where else in any other file.... I am using 1.36, if that matters
That is probably why it isn't working for you. That was just a DEMO variable I used to represent the actual one (which would be in the module you are trying to edit). I do not have that module in front of me so I don't know the exact terminology.
"MODULE_SHIPPING_COD_STATUS" is the Constant that refers back to the language file for that module (cod).
To make it work, you should replace that with the proper constant value (found in that shipping module you are trying to edit).
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Hi, this does not work either
------------------------
// turn off COD for low value
if (zen_get_shipping_enabled($this->code) and $total_cart >= 50) {
$this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
}
-----------------------
I'd have to actually see the page of code you are trying to alter to tell you where to place it and to find out if that code is the exact code you need.
It is the "style" you want to follow though. I used it on a few sites (for shipping etc..) and it worked fine. Again, though, those are different modules.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Bookmarks