Forums / Built-in Shipping and Payment Modules / Flat rate on one category only

Flat rate on one category only

Locked

Views: 679

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Mar 2009, 5:23 AM
#1
yxw168 avatar

yxw168

New Zenner

Join Date:
Jan 2007
Posts:
26
Plugin Contributions:
0

Flat rate on one category only

Hi,

I am using v.1.3.7. I need some help here on setup shipping method. Most of categories in my store are using weight based shipping. They are working very well. However, recently I have decided changing ONLY one of them to start using flat rate shipping. How can I setup the system?

Thanks for in advance.

Yxw168

:smile::smile:

15 Mar 2009, 5:26 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Flat rate on one category only

Set the products_weight on that category of products to 0 ...

Then, you can test in your shipping module for if there are 1 or more Products that use the master_categories_id that matches your Category for the Flat Rate categories_id in the order and if so, add on to the calculated shipping cost ...

In the shopping_cart class is a function that should be able to help you:

  /**
   * 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!

15 Mar 2009, 9:06 PM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Flat rate on one category only

Or, if the thought of getting involved with the code to that level paralyses you with fear, you could get the Advanced Shipper module from ceon.net (it IS a commercial offering) which will allow you to set up per category shipping amongst a vast range of other possibilities.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !