That was loads of fun ...
Thanks for the update that this is woking for you ...
That was loads of fun ...
Thanks for the update that this is woking for you ...
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!
I truly appreciate your patience and brilliance, Linda!
Do you mind if I sum this coupon part up and put this into a new thread to help others along?
Cheers,
J.
Me again . Can I confirm with you that this code is okay to put into includes\modules\payment\cod.php to allow only certain customers the option to pay upon pickup? I've tested it and it seems fine, just looking for some expert eyes so as to avoid any potential problems...
PHP Code:
'zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$this->enabled = false;
}
}
[COLOR="Red"] $chk_group = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if ($chk_group->fields['customers_group_pricing'] == 2 || $chk_group->fields['customers_group_pricing'] == 3) {
$this->enabled = true;
} else {
$this->enabled = false;
}[/COLOR]
// disable the module if the order only contains virtual products
if ($this->enabled == true) {
if ($order->content_type != 'physical') {
$this->enabled = false;
}
It appears correct, as long as you have tested that this is working correctly and only showing for Group 2 and 3 and nobody else, then is should be fine ...
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!
I am also interested in only showing a particular shipping module/option when a customer is from a certain pricing group. I am not very good at coding. I have three customer groups. I call them retail, wholesale, and distributor. I want the third group to see only one particular module (staticlist)--a shipping mod I've installed.
Any help in getting this done would be greatly appreciated. Thanks!
Gary
PS. I'm using 1.3.8a (might upgrade soonish when I have time)
If that shipping module is like the others, you should have a setting for the $this->enabled ...
For example, on the Flat Rate flat shipping module in:
/includes/modules/shipping/flat.php
you could customize it so that it only shows for those in Group ID 3 by adding the new code in red:
Code:// disable only when entire cart is free shipping if (zen_get_shipping_enabled($this->code)) { $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false); } // disable when Group ID is not 3 $chk_group = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'"); if ($chk_group->fields['customers_group_pricing'] != 3) { $this->enabled = false; }
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!
:-) Thank you! The coding works great! One more question: This mod allows me to have customizable multiple choices for shipping, with a different rate for each one. Right now I can only make it a fixed amount. Any way to make it a percentage of the order total? Or do I need to ask the mod creator?
I don't know anything about the shipping module you are using so probably addressing it to the developer of it would help you best ...
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!
Bookmarks