Product Attributes to Product Options

tmorton <[email protected]>
Newsgroups gmane.comp.web.oscommerce.general
Message-ID <ab44471c17de47eba8ca9e220608aa71@osCommerce-Forums>
This message was sent from: General Support
http://forums.oscommerce.com/viewtopic.php?p=227701#227701
----------------------------------------------------------------

Hello!
I'm doing some modifications to the osC 2.2 MS2... I'm working on weights (again! :oops: ). So, I've got some attributes and options setup. I have this all working fine, except now I need to calculate the weight. Here's what I've got:

Option: Unit

Option Values:
Quarter Pound (weight: .25)
Half Pound (weight: .5)
Pound (weight: 1).

I've added a new column to Options Values called weight where is holdes the weight  of the correct option value.

Then, I have the attributes setup:
(Product, Lettuce):
Quarter Pound: $5.50
Half Pound: $10.00
Pound: $19.50

On the product view page (catalog, not admin), the user selectes the correct unit.

Now is where I'm getting stuck. I need to modify the shopping cart class to calculate the weight from the selected attribute, [b]not the product its self[/b].
So, I was going to do some selecting from tables in the calculate function... However, I don't really know where to start, and don't know how to get the selcted attribute.

Any Ideas/Pointers?
Thanks, Taj
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.