Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prices in product attributes


dogpaw

Recommended Posts

First of all, I'm selling shirts with different sizes. I have set up attributes for one product as "small, med, large, etc..."

 

They are all the same price EXCEPT for the XXL size which is $2 more than the rest. I've figured out how to use the prefix as "+" and put 2.00 in the value price.

 

That's fine but I want to just put the actual price in each value price box. But when I do, the prices don't calculate correctly.

 

Ex. small is $8.50 (the regular price). If I put 8.50 and leave the prefix empty, the price shows up as "0"

 

xxl is $10.50 ($2 more than regular). If I put 10.50 in the value price and leave the prefix empty, the price shows up as -$2 (that's negative 2).

 

Is this just not possible to do?

 

Should I go back to just using the $2 with the "+" in the prefix?

 

thanks,

Chijo

Link to comment
Share on other sites

There might be a contrib to deal witht his more elegantly, but you can use the prefix, and the $2 for example, but with a little code modification in product_info.php, you can get the actual price to display in the drop down box. Give me a second to find the right post for you.

 

Jeremy

Link to comment
Share on other sites

This is how I took control of the display order, so that it was always consistent and sensible for every product:

 

You're looking in the file product_info.php for the line that says:

tep_db_query function for $products_options....

When you find it add this to the end of the line :

 

. "' order by products_options_values_id");

 

in place of the . "'"); that's there now

 

Now all you need to do is make sure you link the attributes in the order you want them to appear, so that the id numbers are in ascending order (will display the attribute with the lowest id number first). Jeremy

Link to comment
Share on other sites

I used that code from Matt in that thread. I'm still trying to figure out how to configure the Admin for the sizes and prices.

 

If I put the actual price of the size in the value price, that price shows up as "$-8.50" in the drop down in the store and the add to cart price is actually "0"

Link to comment
Share on other sites

Ok, you need to have a default shirt size, that is the product, say large for example, and the product price is the price of a large shirt. Then put in the attributes for S, XL, XXL ect. and the price mod to suit. Eg S = - 2.00, XL = + 1.00, XXL = +2.00, what ever. Then it should work properly.

 

Jeremy

 

I almost forgot, make sure you put an attribute for large, but leave the price info blank for that attribute.

 

And rereading above I see you use S as the default so start with it, and adjust off of it's price, so leave the price attribute for S blank, but set the product price for the S shirt.

Link to comment
Share on other sites

Still confused.

 

s, m, l, xl are all the same base price of $8.50.

 

The XXL is $10.50.

 

I put in $2.00 +

Then I get ($2.00) in the drop down, without the "+" and then the price is correct once added to the cart. I don't get the $10.50 to show in the drop down.

Link to comment
Share on other sites

Sorry to beat this topic to death but, if I leave all but the XXL blank. There are NO prices showing in the drop down. The price added to cart is correct though, but this is where I started in the default before I chaned the code.

 

Adding 2.00 + for XXL shows $2.00 in the drop down but price is correct in cart. Again, this is the same as default.

Link to comment
Share on other sites

I did notice that there's a note that Matt's code will not work if there is more than one option. I have two options but there is only one active for this one product that you just viewed. Could this still be a problem?

Link to comment
Share on other sites

I TRULY appreciate your help with this thread. I'll check out this contrib. But for now ... dinner and sleep.

 

I'll check back on this tomorrow.

 

THANK YOU :sweating:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...