Help setting up products

Posts: 44
Joined: 02/20/2008

I'm using Ubercart for a business that sells soil products (rock, barkdust, soil amendments, etc.) and services (bark blowing, drop box, recycling, etc.), and I need some help setting up my catalog.

My first thought is to create

  1. two terms at the top level of the Catalog vocabulary: Products and Services.
  2. Under that, categories under Products for the soil types (Bark Dust, Rock, etc.), and terms under Services (bark blowing, recycling, etc.).

The next issue is how to set the price for each product. The products are priced by quantity (1 yd, 2 yds, etc.). The default Product allows one price per product. Do I add attributes that are quantities and set the prices that way? Or do I need to use product classes? The quantities are the same for all of the products, but some products aren't sold in certain quantities. For instance, the Rock products aren't sold in the 7.5 yds and 1.5 units quantities. Wouldn't that be more appropriate for a class?

Thanks.

Posts: 18
Joined: 09/14/2007
Bug Finder

I had the same question.

What solution have you arrived at?

Posts: 44
Joined: 02/20/2008

Wow, it looks like I stumped everyone.

cdiggity, I'm working on it, and I'll let you know what I come up with.

In the meantime, I have some more questions after re-reading the docs multiple times.

1) I've added an attribute called Quantity, and created 9 options, one for each quantity (i.e. 1 yd, 2 yds, etc.). However, it appears that I have to set a base price for each product, and then the attributes add the specified amount to the base price. But that's not what I want; I need the attribute price to be the total price, not an addition to the base price. Is there a way to keep the base price from showing, and just use the price of the selected quantity (other than setting the base price as $0), including removing the '+' from the price for each attribute option?

2) In my case, the Weight and Dimensions fields are unnecessary. Is there a way to remove them from the Product creation form, or do I just ignore them?

Thanks.

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

You can configure the store to show the "total calculated" price of the adjustments, it's in Attribute settings under /admin/store/settings

2) Just ignore them, or you can create a custom module that is just an invocation of hook_form_alter which eliminates those fields. Ignoring them is easiest, though.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 44
Joined: 02/20/2008

Well, that helps a little, but doesn't really do what I need. All it does is control how the attribute price is displayed in the list, not the underlying price. If I set a price that is anything other than zero, then the price of the attribute is added to it, when I want it to replace the price. So, f I'm understanding this properly, it is automatically assumed that when adding attributes to a product, the attribute adds to the pre-defined base price instead of replacing it. Why is that? That doesn't make sense to me. In addition, the base price is always displayed in the catalog, so in my case, I will always have a base price of $0.00. I suppose my option is to have the base price of the smallest quantity, but that means that what my user would have to put in would be the difference between each quantity and the base quantity, not the actual price for the quantity, which would be confusing, both for the user and the customer.

So what I need is two things:

  1. The ability to keep the base price from being displayed when the product is listed (since it will always be $0 in this case).
  2. The ability for the attribute price to replace the base price, not augment it.

If there are settings that will do that for me, great, but I haven't found them. If coding is required, can someone please point me in the right direction in terms of where this code would need to be modified. I've written plenty of Drupal code before, so I can do that if necessary.

Thanks.

Posts: 44
Joined: 02/20/2008

Just trying to bring this to the top so hopefully someone will be able to enlighten me...

Posts: 31
Joined: 02/10/2008

Why not just create nested categories, and a separate product for each size. Something like...

Products
-Rock
--1yd
--2yd
--etc
-Barkdust
--1yd
--2yd
--etc
-ETC.
--1yd
--2yd
--etc
Services
-Bark Blowing
--1yd
--2yd
--etc
-Recycling
--1yd
--2yd
--etc

--

www.PrintersCloset.com - Epson professional graphics printers and supplies for photographers, fine art galleries, sign printers and commercial printing companies.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

You're just going to have to make a custom catalog somehow, one that doesn't include a product price. For the replacement of the price, you can always look into cYu's AJAX Attribute Calculations.

Posts: 44
Joined: 02/20/2008

wadehays - seems doable, but it also seems like a lot of work to have to make 7 different products for one product.

Ryan - you say to "somehow" create a custom catalog. Does that mean there isn't a prescribed way to do that? I could create separate classes or something like that I guess, but I do't think that would solve the problem. All I really want to do is hide the Price field in the product listing, since it is possible to just use the attribute as the price. Couldn't I just hook into the page that lists the products and keep the price from being displayed?

Thanks.

Posts: 822
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I guess I missed some nuance, but isn't this simple? Use attributes/options only for the size/type, like cedar bark dust vs. fir nuggets. Then use the quantity field to specify the volume in terms of cubic yards. The Custom Price contribution http://www.ubercart.org/contrib/2289 can be used to set a price per cubic yard based on the quantity (e.g. lower price/cu yard for high volume, larger price for small volume...) and the Product Minimum/Product Maximum contributions can limit the quantities (e.g. can't fit more than 7.5 cu yards/1 unit on the truck!).

Or if you want to continue on the way you're going, that's OK too. To answer your questions:

Quote:
So what I need is two things:

1. The ability to keep the base price from being displayed when the product is listed (since it will always be $0 in this case).
2. The ability for the attribute price to replace the base price, not augment it.


I've done this on one of my sites with a tiny bit of jQuery. You can clear out the display price with one line of jQuery on page load (or better yet, change your node-product template to not print the display price at all, just the empty <div>), and use one more line of jQuery to set the contents of the display price <div> to be the attribute option price when the attribute select box fires a change().

In the catalog, you can theme the page so the price doesn't show or you can insert text saying something to the effect of "starting at $x.xx per cubic yard" where $x.xx is your base price. The product page is where they will see the exact numbers.

--

<tr>.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

It just depends how you're listing products... I don't know if you're using the core catalog (in which case you can turn the price off altogether in the table display settings) or a custom solution with Views or just the /products listing. You just need to find the appropriate method for whatever you're using, and that may mean making your own with Views. You can alter the page display however you want, and through the product display settings you can turn off price displays altogether (but not per class).

Posts: 44
Joined: 02/20/2008

TR and Ryan, thanks for your responses. They are very helpful. There is certainly a lot of flexibility here. I had forgotten about the table display options, so I might just stick with the core catalog and hide the Price field. I've also been learning jQuery, so I could go that route.

Thanks again.