Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Product priced by attributes

Product priced by attributes

Locked

Views: 3,806

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
29 Jun 2007, 1:20 PM
#1
lvanderb avatar

lvanderb

New Zenner

Join Date:
Mar 2006
Posts:
27
Plugin Contributions:
0

Product priced by attributes

My client is running Zen Cart 1.3.7
Database Patch Level: 1.3.7
v1.3.7 [2007-02-14 12:13:34] (Fresh Installation)

They sell floss, amongst other things, and want it to be priced by attributes, so e.g. default product price is $.74, #5 Pearl Cotton is $2.55 - they have in their attributes the default product at $.74 and one option is the #5 Pearl Cotton..

Regardles of whether Product Priced by Attributes is Yes or No, and whether Include in Base Price When Priced by Attributes is Yes or No ( they had it on, I turned it off) - the attribute price is always always always ADDED to the product price.

How can I just have the attribute price added to the cart - and I don't want to put 0 as the product base price, that won't work for this store. I know I've had this working in other osCommerce and creLoaded stores...

I read through a lot of the HOW-TO - and I'm sure I haven't missed anything, but you never know.

Thanks,
Linda

29 Jun 2007, 4:16 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product priced by attributes

And why won't base price = 0 work here? It is the only way to make the attribute price the whole price.

You can make an option value of "Plain Floss" or whatever with a price of $.74, and make it Default in Attributes Controller.

30 Jun 2007, 2:02 PM
#3
lvanderb avatar

lvanderb

New Zenner

Join Date:
Mar 2006
Posts:
27
Plugin Contributions:
0

Re: Product priced by attributes

I suppose that is reasonable, but then some product have attributes and some don't - it's just less confusing for the client.

At any rate, I was able to modify the code to do what I want it to do.

Edited \includes\functions\functions_prices.php line 138… change to

$the_base_price = $the_base_price;

do the same in admin… \admin\includes\functions\functions_prices.php line 149

and edited \admin\includes\classes\shopping_cart.php (around lines 466 and 853) and \includes\classes\shopping_cart.php (around line 1069)

//$products_price = $products->fields['products_price'];
            $products_price = 0;

This is just more logical for me - hopefully it doesn't mess up other things, but we will see!

Thanks,
Linda

30 Jun 2007, 4:05 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product priced by attributes

As long as your client will never want an attribute that is added to the base price for any product...

"but then some product have attributes and some don't "
Why do you think the suggestion will cause any product not to have attributes? Being default does not remove the attribute from displaying as such; it is merely pre-selected. Have you tried this?

I just hope you have made good notes and/or saved backup copies so your changes don't get wiped out in upgrades (especially if done by someone else in the future). Most if not all of the files you edited are not at this point part of the template override system, so there is not a standard method to carry on changes.

1 Jul 2007, 1:21 AM
#5
lvanderb avatar

lvanderb

New Zenner

Join Date:
Mar 2006
Posts:
27
Plugin Contributions:
0

Re: Product priced by attributes

Good point, I think we're ok, as they also plan to sell fabric by the piece - that would also be priced by attribute...

Now I may back out my changes, as I am better understanding that a base price of 0 would never show as zero if the product is priced by attribute - correct?

Thanks for your patience,
Linda

1 Jul 2007, 1:45 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product priced by attributes

A product with base price 0 and priced by attributes will show its "starting at" price as the lowest combination of attribute prices.

If Large widgets are $4.00 and small are $2.00, and there is a choice of trim with plain default at +0 and chrome at +$1.00, the "starting at" price will be $2.00.