Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33
  1. #11
    Join Date
    Oct 2015
    Posts
    30
    Plugin Contributions
    0

    Default Re: Need help with shipping

    Quote Originally Posted by bislewl View Post
    What are the configuration values set at?
    Sorry, I really don't understand the question. Can you be more specific?

  2. #12
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Need help with shipping

    Quote Originally Posted by Miru View Post
    Sorry, I really don't understand the question. Can you be more specific?
    In the admin:
    Configuration -> Product Tare Groups

  3. #13
    Join Date
    Oct 2015
    Posts
    30
    Plugin Contributions
    0

    Default Re: Need help with shipping

    The file was empty, it couldn't been opened.

  4. #14
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    391
    Plugin Contributions
    0

    Default Re: Need help with shipping

    This is the only "Need Help With Shipping" thread that is not closed.

    Sorry if this is off the topic of the original post...but as usual, I can't find the place to start a new thread.

    I've searched and read several threads related to "multiple ship origin zip codes", "shipping help", "dropship shipping", etc. None of the threads I've ran across in the last couple of days have a usable answer.

    I have multiple ship origin zip codes for my products (114,000) but Zencart only has one location for shipping ORIGIN zip code...which is set in admin/configuration/shipping/packing/postal code.

    I need to replace the admin ship origin zip code with each products unique ship origin zip code just before it is evaluated for UPS shipping cost. I believe(hope) that is the only change I need to make in order to get accurate shipping cost for each product.

    I've added a column to my products table, "ship_zip" for each product but I need a way to plug that zip code into shipping cost evaluation process.

    I have studied the ups.php module in depth and I know (think) I need to change the configuration table just before line 148:

    PHP Code:
    $this->_upsOrigin(SHIPPING_ORIGIN_ZIP$country_name['countries_iso_code_2']); 
    with a simple query like:

    PHP Code:
    [B]$products_ship_zip[/B] = $db->query("SELECT ship_zip FROM products WHERE products_id = PRODUCT BEING EVALUATED FOR SHIPPING");

    $query = ("UPDATE $configuration
    SET 
    $configuration.`configuration_value` = [B]'$products_ship_zip'[/B]
    WHERE 
    $configuration.`configuration_key` = 'SHIPPING_ORIGIN_ZIP' ");
    $stmt $db->prepare($query);
    $stmt->execute(); 
    What variable is represents the products_id during the shipping cost evaluation process?

    I've tried echo testing the ups.php module but can not put my finger on the products_id variable.

    Does the ups.php module evaluate shipping cost a product at a time or in bulk? I'm assuming one at at time.

    Should I be setting the $products_ship_zip and changing the configuration in a different file?

    Thanks in advance for any help anyone can provide.
    Last edited by mikeel100; 22 Oct 2015 at 12:01 AM.

  5. #15
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Need help with shipping

    Quote Originally Posted by Miru View Post
    The file was empty, it couldn't been opened.
    When you login to your admin and go to Configuration -> Product Tare Groups

    If it's empty trying running the uninstall.sql, and it will re-install

  6. #16
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Need help with shipping

    Quote Originally Posted by mikeel100 View Post
    This is the only "Need Help With Shipping" thread that is not closed.

    Sorry if this is off the topic of the original post...but as usual, I can't find the place to start a new thread.

    I've searched and read several threads related to "multiple ship origin zip codes", "shipping help", "dropship shipping", etc. None of the threads I've ran across in the last couple of days have a usable answer.

    I have multiple ship origin zip codes for my products (114,000) but Zencart only has one location for shipping ORIGIN zip code...which is set in admin/configuration/shipping/packing/postal code.

    I need to replace the admin ship origin zip code with each products unique ship origin zip code just before it is evaluated for UPS shipping cost. I believe(hope) that is the only change I need to make in order to get accurate shipping cost for each product.

    I've added a column to my products table, "ship_zip" for each product but I need a way to plug that zip code into shipping cost evaluation process.

    I have studied the ups.php module in depth and I know (think) I need to change the configuration table just before line 148:

    PHP Code:
    $this->_upsOrigin(SHIPPING_ORIGIN_ZIP$country_name['countries_iso_code_2']); 
    with a simple query like:

    PHP Code:
    [B]$products_ship_zip[/B] = $db->query("SELECT ship_zip FROM products WHERE products_id = PRODUCT BEING EVALUATED FOR SHIPPING");

    $query = ("UPDATE $configuration
    SET 
    $configuration.`configuration_value` = [B]'$products_ship_zip'[/B]
    WHERE 
    $configuration.`configuration_key` = 'SHIPPING_ORIGIN_ZIP' ");
    $stmt $db->prepare($query);
    $stmt->execute(); 
    What variable is represents the products_id during the shipping cost evaluation process?

    I've tried echo testing the ups.php module but can not put my finger on the products_id variable.

    Does the ups.php module evaluate shipping cost a product at a time or in bulk? I'm assuming one at at time.

    Should I be setting the $products_ship_zip and changing the configuration in a different file?

    Thanks in advance for any help anyone can provide.
    If the understanding of your question is correct you want to vary the origin zip code based on the zip-code it comes from?

  7. #17
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    391
    Plugin Contributions
    0

    Default Re: Need help with shipping

    Yes, that is correct. Thanks for the quick reply.

    I think I have found the variable ($prid) that represents the product_id of the product being evaluated for shipping:)

    I'm getting ready to plug in my code above using this variable to change the ship origin in admin and see if this changes the ship origin to the product I am testing with.

    I'll post results here.

  8. #18
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Need help with shipping

    Quote Originally Posted by mikeel100 View Post
    Yes, that is correct. Thanks for the quick reply.

    I think I have found the variable ($prid) that represents the product_id of the product being evaluated for shipping:)

    I'm getting ready to plug in my code above using this variable to change the ship origin in admin and see if this changes the ship origin to the product I am testing with.

    I'll post results here.
    The problem is if someone orders 2 products, then which zipcode should it use.

    There is a shipping module out there that would do what your looking for, however it is no longer being sold/supported because of an issue with the licensing and the family.

    If I were to do this, I would some how "hack" together a way to group the products from each zipcode and then cycle through the UPS module.

  9. #19
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    391
    Plugin Contributions
    0

    Default Re: Need help with shipping

    Around line 653 of /includes/classes/shopping_cart.php...

    PHP Code:
    // products price - MIKE ADDED ship_zip
    $product_query "select products_id, products_price, products_tax_class_id, products_weight,
    products_priced_by_attribute, product_is_always_free_shipping, products_discount_type,
    products_discount_type_from,
    products_virtual, products_model, ship_zip
    from " 
    TABLE_PRODUCTS "
    where products_id = '" 
    . (int)$products_id "'";

          if (
    $product $db->Execute($product_query)) {
            
    $prid $product->fields['products_id'];
            
    $products_tax zen_get_tax_rate($product->fields['products_tax_class_id']);
            
    $products_price $product->fields['products_price'];

    /*MIKE ADDED TO CHANGE SHIP ORIGIN FOR EACH PRODUCT*/        
    $ship_zip $product->fields['ship_zip'];
    //echo $ship_zip." SHIP FROM ZIP";
    $db->Execute("update " TABLE_CONFIGURATION 
    SET `configuration_value` = '
    $ship_zip'
    WHERE `configuration_key` = 'SHIPPING_ORIGIN_ZIP' "
    );
    /*END MIKE ADDED*/ 
    Echo testing showed the correct origin zip for each of the 3 products in the customers shopping cart...whether it processed the shipping module one product at a time is still fuzzy.

    The code does update admin with the correct ship origin on single product testing...but, again, I'm not sure how the shipping is calculated. One product at a time or in bulk???

    For now, it is better than playing roulette on my orders.

    If someone could point out the pros and cons of this method, I would appreciate it.
    Last edited by mikeel100; 22 Oct 2015 at 03:31 AM. Reason: Edited out echo from php code

  10. #20
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    391
    Plugin Contributions
    0

    Default Re: Need help with shipping

    So, the remaining question I have is:

    Do products enter the ups.php one at a time or in bulk?

    Thanks.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Need help with shipping
    By enetllc in forum Built-in Shipping and Payment Modules
    Replies: 27
    Last Post: 17 Sep 2010, 04:46 AM
  2. Need Help With UPS shipping
    By midnightwalker in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 12 Aug 2010, 05:24 AM
  3. Need Help with Shipping
    By icecopi in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 4 Apr 2009, 04:51 AM
  4. Need Help With Shipping
    By GalaxiDesigns in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 9 Feb 2008, 05:49 AM
  5. need help with shipping config
    By z3nus3r in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 3 Jul 2007, 03:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg