Originally Posted by
frank18
I don't think your issue is directly related to the shipping module but has something to do how your taxes are configured. How are your taxes configured?
Is your local tax defined and charged for customers in your city or state, iow did you set a tax zone just for your city/state so a customer who's shipping address is within that zone and gets charged with the local tax?
You may want to look at the tax zones first.
Another consideration would be to restrict the Store Pickup module to customers within a certain range of your physical store location as it is unlikely that someone from L.A. would personally pickup if your store is located on the other side of the country ie NYC. You can achieve this by installing PDP:
https://www.zen-cart.com/downloads.php?do=file&id=1702
i may be on the periphery here, but i do not agree with a number of things here.
if the cart correctly charges sales tax on all orders except orders selected for in-store pickup, then something is wrong with the shipping module or perhaps its interface to the tax module. actually i find it hard to say....
in addition, the idea of restricting in-store pickup to a certain geographical area, while interesting certainly has nothing (or very little) to do with the problem at hand. in fact, adding another module to the cart when the existing cart is not functioning the way the store owner/original poster expects it to work, is adding another level of complexity that in my mind will make this problem harder to debug.
in the orders class i added the following function:
Code:
function check_pickup() {
if (strstr($this->info['shipping_module_code'], 'storepickup')) {
$this->delivery['firstname'] = zen_get_configuration_key_value('MODULE_SHIPPING_STOREPICKUP_COMPANY');
$this->delivery['lastname'] = '';
$this->delivery['street_address'] = zen_get_configuration_key_value('MODULE_SHIPPING_STOREPICKUP_ADDR1');
$this->delivery['city'] = zen_get_configuration_key_value('MODULE_SHIPPING_STOREPICKUP_CITY');
$this->delivery['postcode'] = zen_get_configuration_key_value('MODULE_SHIPPING_STOREPICKUP_ZIP');
$this->delivery['state'] = zen_get_configuration_key_value('MODULE_SHIPPING_STOREPICKUP_STATE');
$this->delivery['suburb'] = '';
$this->delivery['company'] = zen_get_configuration_key_value('STORE_NAME');
}
}
and then within the function create (also in the order class), i added the first line in the code section below before the $sql_data_array = array... line
Code:
$this->check_pickup();
$sql_data_array = array('customers_id' => $_SESSION['customer_id'],
'customers_name' => $this->customer['firstname'] . ' ' . $this->customer['lastname'],
...
and now you should have the proper address recorded in the orders table after completion for in-store pickup orders.
whether that helps with calculating your taxes, i can not say.... but it might...
good luck.
Bookmarks