Thank you!
Thank you!
Argh, I should have asked this in my first post, but is there anyway to make sure they are in my state? For example, if I use the city of Charlotte, NC, I do not want people from Charlotte, IL using this.
You would then need to add the state to the IF ...
** EDITED TO FIX STATE REFERENCE **Code:if (strtoupper($order->delivery['state']) == 'FLORIDA' && in_array(strtoupper($order->delivery['city']), array('TORONTO', 'TAMPA'))) {
Last edited by Ajeh; 19 Aug 2010 at 01:00 AM. Reason: edited reference to state
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 for your help. I have the following code, but after entering the IF statement for state, it does not work. I tried it with "NC" and "North Carolina".
Code:function quote($method = '') { global $order; if (strtoupper($order->delivery['delivery_state']) == 'NC' && in_array(strtoupper($order->delivery['city']), array('CHARLOTTE', 'INDIAN TRAIL', 'MATTHEWS', 'MINT HILL', 'STALLINGS'))) { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_STOREPICKUP_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_STOREPICKUP_TEXT_WAY, 'cost' => MODULE_SHIPPING_STOREPICKUP_COST)));
It is always a good idea to follow the bouncing ball ...
Notice that I used:
FLORIDA
Two reasons for that:
1 for testing in the IF
2 the orders table stores the full name of the state ...
Moral of the story ...
Be sure to use for the IF statement the full name of the state in upper case ...
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!
It still does not work. Here is my code:
Code:function quote($method = '') { global $order; if (strtoupper($order->delivery['delivery_state']) == 'NORTH CAROLINA' && in_array(strtoupper($order->delivery['city']), array('CHARLOTTE', 'INDIAN TRAIL', 'MATTHEWS', 'MINT HILL', 'STALLINGS'))) { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_STOREPICKUP_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_STOREPICKUP_TEXT_WAY, 'cost' => MODULE_SHIPPING_STOREPICKUP_COST))); }
Sorry ... got carried away on the reference to the delivery state of the order ...
Use on the IF:
Code:if (strtoupper($order->delivery['state']) == 'NORTH CAROLINA' && in_array(strtoupper($order->delivery['city']), array('CHARLOTTE', 'INDIAN TRAIL', 'MATTHEWS', 'MINT HILL', 'STALLINGS'))) {
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 so much. You have been a big help!
No need for applause ... just throw money ...
Thanks for the update that you now have this working ...
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!
Ajeh,
I followed your code to the letter, and it works beautifully. I noticed that on the shipping page it changes 'Walk-in' to 'local delivery'. My question is, Is there a way I can give them "Both" options? A way to choose whether they want it delivered, or they would like to come pick it up.
Thanks
Bookmarks