8 replies [Last post]
cdiggity's picture
Offline
Bug Finder
Joined: 09/14/2007
Juice: 40
Was this information Helpful?

I'm trying to set up shipping as follows:

  • orders under 2kg are charged $8 for shipping
  • orders over 2kg are charged $18 for shipping
  • products from one of my catalog categories (category1) are charged $30
  • products from another of my catalog's categories (category2) are charged $36

I've added 4 different flat rate shipping methods for the above amounts in Administer, Store, Configuration, Shipping quote.

I've added conditions to the "Getting shipping quote via Orders under 2kg", "Getting shipping quote via orders over 2kg", etc events in Workflow-ng to check the order total weight for the first two options. Everything looking good so far: The correct amounts appear based on order weight. Now I also need to add conditions to exclude them from category1 and category2.

Which Catalog category a product appears in isn't in the list of workflow-ng conditions. The product's "Shipping Type" which sounds promising is a dead end as apparently the only shipping type at the moment is "Small Package".

Product Class seems like the most promising option here:
How do I add existing products to a class that I've just created? I need to do this so that they can have a specific flat rate quote attached to them in workflow-ng.

There doesn't seem to be a Class option on the product page.

I have tried adding an attribute with no options to the class and then assigning that attribute to the product (so then it must be in the class right?) but that doesn't make the correct shipping charge appear at check out.

I know I could edit each product in "category1" and "category2" to have the proper flat rate but that makes updating the flat rate in the future rather cumbersome.

I'm using bazaar version from today. I've detailed this store's shipping plan they've come up with here in case someone has a better idea of how to implement it.

Perhaps the best solution is to
A) let products be added to a class
b) let workflow-ng look at product catalog
c) you tell me!
thanks for any ideas!

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Product classes/categories and different shipping flat rates

Product classes are new node types that are listed under Create content. You can't just change products back and forth between different classes, but if you're still building the catalog, that shouldn't be a big problem.

cdiggity's picture
Offline
Bug Finder
Joined: 09/14/2007
Juice: 40
Re: Re: Product classes/categories and different shipping flat r

I see then that classes are really not what I should be using to apply different shipping rules - I shouldn't need a different class of products for that if a class is a whole different node type with it's own create content link.

All of the products have been manually entered into ubercart so the catalog is 'built' already.

I'm not sure how to proceed on this but thanks for the information!
C

webhostnz's picture
Offline
Joined: 04/20/2008
Juice: 13
Lyle wrote:Product classes
Lyle wrote:

Product classes are new node types that are listed under Create content. You can't just change products back and forth between different classes, but if you're still building the catalog, that shouldn't be a big problem.

Lyle - if you have the time I'd appreciate an explanation of why its not going to be possible to change products between different product classes.

I'm asking now because as a new user of Ubercart (and Drupal) I'm developing a site where the same attributes and options apply to all products so far, so I have designated a class to make loading the products easier for my store administrator. However I can see the possible need for new classes later that might require an existing product to have its class changed.

e.g. I have a class Music - but in the future I might need to split the existing inventory into what might be considered sub-classes by some, i.e. Classical, Modern, Pop... if I create new classes called Classical, Modern, Pop and stop using the class "Music" I will have to recreate all my hundreds of products under their new classes (if I understand your comment above) which will be a massive task.

I realise (I think) that adding a new Attribute might cover the above situation but since we currently have attributes that cover several VENUES each with options that cover PRICE, a new Attribute does not seem a logical move whereas a new CLASS does...

Ian

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Product Class

Played with moving one product class to another product class via the database. Seemed to work. Not sure about any attached attributes.

See http://www.ubercart.org/forum/support/4124/moving_product_one_class_another

webhostnz's picture
Offline
Joined: 04/20/2008
Juice: 13
Alaska wrote:Played with
Alaska wrote:

Played with moving one product class to another product class via the database. Seemed to work. Not sure about any attached attributes.
See http://www.ubercart.org/forum/support/4124/moving_product_one_class_another

Thanks Alaska - this worked for me and shows that direct manipulation of the Node table will allow any product already set up to be moved to any product class desired without seemingly affecting anything already set up. However before changing the database I set up a class that had the same attributes and options assigned to the original products.

Would still be nice to see this sort of functionality built into UC.

Ian

Alaska's picture
Offline
Joined: 10/16/2007
Juice: 1433
Database

Glad to see that it worked.

Did the same on this end. However, just don't like to mess with the database unless it can not be avoided. It is simple to do, but can cause issues if not careful.

In all cases, backup the database before making any modifications.....

teksestro's picture
Offline
Joined: 06/03/2008
Juice: 31
Re: Product classes/categories and different shipping flat rates

cdiggity, it seems to me that the *elegant* way to do what you want is by using workflow-ng configurations. You will need 4 configurations, as you may have already guessed, 1 for each one of your shipping methods.

As you have already seen, configuring workflow-ng to check for your shipping methods 1 & 2 (based on weight) is easy, because "Check an order's total weight" is a built-in condition that you can check. There is no built-in condition, however, for "Check product's catalog category". It seems to me, that if you need to check for something specific like that, which is not built-in by default in workflow-ng, you are supposed to use the "Execute custom PHP code" condition. By using your own, customised php code, you can check for whatever conditions you wish - the php code simply has to return a 'true' or 'false' to workflow-ng, to either enable or disable the shipping method for the order.

Unfortunately, I'm a newbie at Übercart, but I'm sure that someone who is more familiar with the framework, can write that code for you in 15 minutes. I hope someone else may be able to give you a hand! Smiling

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
teksestro wrote:As you have
teksestro wrote:

As you have already seen, configuring workflow-ng to check for your shipping methods 1 & 2 (based on weight) is easy, because "Check an order's total weight" is a built-in condition that you can check. There is no built-in condition, however, for "Check product's catalog category". It seems to me, that if you need to check for something specific like that, which is not built-in by default in workflow-ng, you are supposed to use the "Execute custom PHP code" condition. By using your own, customised php code, you can check for whatever conditions you wish - the php code simply has to return a 'true' or 'false' to workflow-ng, to either enable or disable the shipping method for the order.

Yes, there is a built-in condition to check a product class. It's called "Order has a product of a particular class". Works great, no need for PHP code here.

<tr>.