Greetings:
I was wondering if there was a line or code that we can add to the "Store Pickup" shipping model that will make it so that only people in my Group discount called "Friends" can use this option..
Thanks
Greetings:
I was wondering if there was a line or code that we can add to the "Store Pickup" shipping model that will make it so that only people in my Group discount called "Friends" can use this option..
Thanks
While this is not built into Zen Cart ... you could customize the shipping module to only show for people in a given Group Discount group ...
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!
You need to look up the customers Group Discount to find out if they are allowed to see the Store Pickup shipping modules ...
This is best done with a function in the catalog to look up the customer's group_id and a function in the admin to return true so that the modules can function in both the Catalog and Admin ...
If you look at the current /includes/modules/shipping/storepickup.php there is the line:
If you added an IF statement around this where the function checks for the right group id and returns true if this is the Friends or false if it is not ... that can control whether this shows:PHP Code:$this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);
PHP Code:if (your_function_here) {
$this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);
} else {
$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!]
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!
Do you know what is wrong with this code ? 'Friends' is the group that i want it to show too...if (MODULE_ORDER_TOTAL_GROUP_PRICING_TITLE == 'Friends') {
$this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);
} else {
$this->enabled = false;
}
You need to really build a lookup function for the Group ID as it is not available to you in that format when the shipping modules run ...
The function would check either the group_pricing table for that customer based on group_name or could check the customers table for the customers_group_pricing which is the group_id ...
If it is the one associated with your "Friends" return true and the shipping module would show ... if not, return false and the shipping module would hide or be disabled ...
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!