How are you identifying the Invoice Customers?![]()
How are you identifying the Invoice Customers?![]()
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!]
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 Ajeh,
I use the Customers area in admin and then select the relevant option (Invoice Only) from the Discount Pricing Group drop down.
For example, let's say the Discount Group ID is 2 ... you can customize the code for:
/includes/modules/shipping/freeoptions.php
with the code in RED:
Now only those in Discount Group ID 2 can use this shipping module ...Code:// disable only when entire cart is free shipping if (zen_get_shipping_enabled($this->code)) { $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false); } // bof: Only for Discount Group 2 if (!IS_ADMIN_FLAG) { $chk_discount_group_sql = "SELECT customers_group_pricing FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'"; $chk_discount_group = $db->Execute($chk_discount_group_sql); if ($chk_discount_group->fields['customers_group_pricing'] != 2) { $this->enabled = false; } } // eof: Only for Discount Group 2 if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEOPTIONS_ZONE > 0) ) {
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!]
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!
Cool!
Sorry to be a pain - but I have had a look at the SQL table and it appears that every customer that is not in a "discount group" is set to "0".
Is it possible to reflect in the code that if customer is in group "0" then they do not get free shipping?
Then you would change the code:
to read:Code:if ($chk_discount_group->fields['customers_group_pricing'] != 2) {
and anyone not in a group will not see it ...Code:if ($chk_discount_group->fields['customers_group_pricing'] == 0) {
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!]
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!
Ajeh - this is awesome! It works perfectly - thank you so much for this.
You are most welcome ... thanks for the update that this is working for you now ...![]()
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!]
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 tried to put your code into the zones module but then I get an blank screen:
Is it in anyway possible to use thies code also in the table and zones module
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
}
// bof: Only for Discount Group 1
if (!IS_ADMIN_FLAG) {
$chk_discount_group_sql = "SELECT customers_group_pricing FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'";
$chk_discount_group = $db->Execute($chk_discount_group_sql);
if ($chk_discount_group->fields['customers_group_pricing'] != 1) {
$this->enabled = false;
}
}
// eof: Only for Discount Group 1
// CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
$this->num_zones = 3;
That code should be able to work in either one ...
What debug logs do you see in either /cache or /logs depending on your version of Zen Cart?
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!]
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 for your reply:
This is what i got when i tried different places to put in the code:
[27-Mar-2013 10:58:47 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 116
[27-Mar-2013 11:07:33 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 116
[27-Mar-2013 11:08:07 Europe/Berlin] PHP Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /public_html/clean/includes/modules/shipping/zones.php on line 348
[27-Mar-2013 11:08:16 Europe/Berlin] PHP Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /public_html/clean/includes/modules/shipping/zones.php on line 348
[27-Mar-2013 11:25:46 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 138
[27-Mar-2013 11:34:57 Europe/Berlin] PHP Fatal error: Call to a member function Execute() on a non-object in /public_html/clean/includes/modules/shipping/zones.php on line 142