Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Sep 2007
    Posts
    79
    Plugin Contributions
    0

    Idea or Suggestion separate charge for specific item

    Hi All!

    I have been searching for info on this.. but i don't even know what keywords I can search for.. lol..

    here goes:

    currently, i have a flat rate, free shipping and local pick up option.

    my flat rate shipping is this:

    total: under 49 - shipping is 7.00
    between 50-99 shipping is 9
    over 100 shipping is free

    i just added an item that requires a separate shipping. What im trying to do is if a customer just buy that specific item (no matter how much the quantity is, it will be 3.50...

    but if they combine anything else with that item (that are not the same), it will bounce back to the above flat shipping method..

    I tried adding another shipping method (ie: a new shipping option)
    but now people are selecting that 3.50 shipping NO MATTER what they buy...(because its the cheapest)

    so what I was wondering if there is a way to code the condition so that zen cart will automatically select 3.50 if the customer is ONLY buys that item....

    sorry if its confusing. im so confused myself lol

    any help would be appreciated! thanks in advance!

  2. #2
    Join Date
    Sep 2007
    Posts
    79
    Plugin Contributions
    0

    Default Re: separate charge for specific item

    anyone?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: separate charge for specific item

    Have you customized your Shipping Module(s)?

    Flat Rate flat shipping is just that ... a Flat Rate without any change based on the Order amount ...

    You are indicating that you have various Flat Rate charges based on Order Amount ...
    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!

  4. #4
    Join Date
    Sep 2007
    Posts
    79
    Plugin Contributions
    0

    Default Re: separate charge for specific item

    thank linda for your response..

    i guess in sort, i would love to have flat rate & a specific price for a specific item.. i know i know.. im asking for too much.. lol

    its just that because i have a "flat rate" for a specific product, it shows up in all the shipping options, and of course, zen cart programs it so that the button for the cheapest shipping is highlighted..

    so what im saying is that people are choosing the cheapest (abeit wrong) option for shipping..

    is there a way to only have the 3.50 option show during the times the customer selects the item and that item only?

    Quote Originally Posted by Ajeh View Post
    Have you customized your Shipping Module(s)?

    Flat Rate flat shipping is just that ... a Flat Rate without any change based on the Order amount ...

    You are indicating that you have various Flat Rate charges based on Order Amount ...

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: separate charge for specific item

    You could always build something into your shipping modules to test for that product and if it exists then turn off all the shipping modules that should not show and turn on the shipping module that should show ...

    You can test what is in the shopping cart via a function in the shopping_cart class:
    Code:
      /**
       * Method to calculate the number of items in a cart based on an abitrary property
       *
       * $check_what is the fieldname example: 'products_is_free'
       * $check_value is the value being tested for - default is 1
       * Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
       *
       * @param string product field to check
       * @param mixed value to check for
       * @return integer number of items matching restraint
       */
      function in_cart_check($check_what, $check_value='1') {
    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!

  6. #6
    Join Date
    Sep 2007
    Posts
    79
    Plugin Contributions
    0

    Default Re: separate charge for specific item

    Quote Originally Posted by Ajeh View Post
    You could always build something into your shipping modules to test for that product and if it exists then turn off all the shipping modules that should not show and turn on the shipping module that should show ...

    You can test what is in the shopping cart via a function in the shopping_cart class:
    Code:
      /**
       * Method to calculate the number of items in a cart based on an abitrary property
       *
       * $check_what is the fieldname example: 'products_is_free'
       * $check_value is the value being tested for - default is 1
       * Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
       *
       * @param string product field to check
       * @param mixed value to check for
       * @return integer number of items matching restraint
       */
      function in_cart_check($check_what, $check_value='1') {
    hi linda!

    i really appreciate your time and efforts, but sadly, im such a novice, i have no idea what your last post meant.. would you mind explaining how the testing and switching is written in php?

    my sincere apologies

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: separate charge for specific item

    Let's say you wanted to customize Flat Rate shipping to charge $3.50 when products_id 12 is in the cart, regardless of quantity ...

    Edit the module and change the function quote to read:
    Code:
    // class methods
        function quote($method = '') {
          global $order;
    
          global $cart;
          $chk_how_many12 = $_SESSION['cart']->in_cart_check('products_id', '12');
          if ($chk_how_many12 > 0) {
    // charge 3.50 if products_id 12 is in the cart
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => 3.50)));
          } else {
    // charge regular flat rate if products_id 12 is NOT in the cart
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => MODULE_SHIPPING_FLAT_COST)));
          }
          if ($this->tax_class > 0) {
            $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
          }
    
          if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
    
          return $this->quotes;
        }
    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!

  8. #8
    Join Date
    Sep 2007
    Posts
    79
    Plugin Contributions
    0

    Default Re: separate charge for specific item

    Quote Originally Posted by Ajeh View Post
    Let's say you wanted to customize Flat Rate shipping to charge $3.50 when products_id 12 is in the cart, regardless of quantity ...

    Edit the module and change the function quote to read:
    Code:
    // class methods
        function quote($method = '') {
          global $order;
    
          global $cart;
          $chk_how_many12 = $_SESSION['cart']->in_cart_check('products_id', '12');
          if ($chk_how_many12 > 0) {
    // charge 3.50 if products_id 12 is in the cart
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => 3.50)));
          } else {
    // charge regular flat rate if products_id 12 is NOT in the cart
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => MODULE_SHIPPING_FLAT_COST)));
          }
          if ($this->tax_class > 0) {
            $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
          }
    
          if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
    
          return $this->quotes;
        }
    LInda, thank you so much for taking the time to explain it....i think im starting to see the light lol

    but how do you code it if you want to charge 3.50 ONLY if that item is the only item in the cart (regardless of quantity). - standalone item

    so if they mix it up with other items, the pricing goes back to normal shipping..

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: separate charge for specific item

    You need to add another condition to the IF:
    Code:
          if ($chk_how_many12 > 0) {
    where you also test that the number of:
    $chk_how_many12

    would equal the total items in the cart ...
    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!

  10. #10
    Join Date
    Feb 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: separate charge for specific item

    I have a problem, I have 4 items on my zen cart site... I want flat priced shipping options for each one and I can't find a way to do that, it displays all shipping options available for each product.

    For example: 1 box of our product, flat shipping $6.95 for First Class mail, with an option for $11.95 for Priority and $13.95 for Canada First Class

    For 3 boxes of our product, I want flat shipping of $12.95 offered via priority mail and $18.95 for Canada First Class and I dont' want the $6.95 first class mail option for the single box to show up.

    Is there a way to do this?

    Thank you very much! I am in a huge time cruch. :)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Need to separate and charge for larger UPS orders
    By In2Deep in forum Addon Shipping Modules
    Replies: 7
    Last Post: 24 Dec 2015, 12:13 AM
  2. Per item handling charge for one category?
    By dkervin in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 16 Nov 2010, 05:38 AM
  3. Shipping - I need separate quotes for each item in the order
    By fajmp in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Jul 2008, 06:41 PM
  4. Extra charge for specific bulky items (table-weight module)
    By SHK in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 9 Apr 2008, 12:23 PM
  5. How do I charge per item for shipping.
    By heatherlsi in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 5 Jan 2007, 01:40 AM

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