Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Apr 2006
    Posts
    320
    Plugin Contributions
    0

    Default Re: Per item shipping, then a flat rate...

    Hello AJeh,

    I am not sure when or why, but someone ordered 10 items in our store today, and each item was charged 200 yen!

    In the last couple of weeks I upgraded to 1.3.5 so perhaps something needs to be adjusted or perhaps I never noticed it before... I re-read your instructions carefully just now and realized you said... ‘use this IF in place of the normal method ..’

    I didn’t actually replace, I added the code to what was already there...

    Here is the section of code as it currently is written. Is this correct or must I eliminate some of it? Or is there something else I must do?

    Thanks in advance...


    // adjusted count for free shipping
    // $total_count = $total_count - $_SESSION['cart']->in_cart_check('product_is_free','1');
    // $total_count = $total_count - $_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1');
    $total_count = $total_count - $_SESSION['cart']->free_shipping_items();

    // if total item count >= 3 charge 600 otherwise, charge regular item charge
    if ($total_count >= 3) {
    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
    'cost' => 600)));
    } else {

    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
    'cost' => (MODULE_SHIPPING_ITEM_COST * $total_count) + MODULE_SHIPPING_ITEM_HANDLING)));

    if ($this->tax_class > 0) {
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    }

  2. #12
    Join Date
    Apr 2006
    Posts
    320
    Plugin Contributions
    0

    Default Re: Per item shipping, then a flat rate...

    Hello!

    Have not had any response so I will explain the situation again.

    Prior to upgrading to 1.3.6 the shipping was set up in my cart to work with the following parameters:

    One item: 200 yen
    Two items: 400 yen
    Three items or more: 500 yen

    With the help of Linda, who wrote the calculation below, I got it to work fine... but now, it no longer functions as it should...

    Could someone help out on this?

    Thanks!

    The calculation that I used/am now using in item.php is:

    // if total item count >= 3 charge 500 otherwise, charge regular item charge
    if ($total_count >= 3) {
    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
    'cost' => 500)));
    } else {
    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
    'cost' => (MODULE_SHIPPING_ITEM_COST * $total_count) + MODULE_SHIPPING_ITEM_HANDLING)));
    }

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,666
    Plugin Contributions
    6

    Default Re: Per item shipping, then a flat rate...

    I stuck that code in place of the original code:
    PHP Code:
          $this->quotes = array('id' => $this->code,
                                
    'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
                                
    'methods' => array(array('id' => $this->code,
                                                         
    'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
                                                         
    'cost' => (MODULE_SHIPPING_ITEM_COST $total_count) + MODULE_SHIPPING_ITEM_HANDLING))); 
    And works fine ...

    Make sure you do not have the original code still in there ...
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  4. #14
    Join Date
    Apr 2006
    Posts
    320
    Plugin Contributions
    0

    Default Re: Per item shipping, then a flat rate...

    Thanks for getting back to me Linda.

    I removed the original code and put in the code you wrote for me earlier...

    That did the trick!

    Thank you for setting me straight!

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,666
    Plugin Contributions
    6

    Default Re: Per item shipping, then a flat rate...

    Sure thing ... glad you were able to get the custom shipping working again ...
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Configuring Taxes for Canadian Sites/Zones
    By DrByte in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 305
    Last Post: 30 Jul 2012, 07:18 PM

Bookmarks

Posting Permissions

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