RE: Product Attributes to Product Options
tmorton <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.general |
|---|---|
| Message-ID | <92e88286342563f0222a7ff008f50504@osCommerce-Forums> |
This message was sent from: General Support http://forums.oscommerce.com/viewtopic.php?p=228194#228194 ---------------------------------------------------------------- Hi, [quote]The easiest thing to do is make a lookup function to get the weight. Then, you can edit the /includes/classes/shopping_cart.php and orders.php to obtain the info. [/quote] Sooo...how would I query the shopping cart to find out what attribute the user selected? Thanks for the idea... :) [quote]The reason I use the products_attributes table instead is that all of the functions, processing and calculations you need flow better when everything happens in the same manner. Example: price_prefix and options_values_price are used in the calculation of $total ... if you added the weight in the products_attributes table you can follow that pattern through all the code and adjust the $weight to use the new weight in an easier manner. [/quote] That's true...do you think that I should just go with it and enter the weight every time for each attribute? [quote]Sometimes it's easier to follow an existing field that behaves in a like manner to what you are trying to do than it is to modify un unrelated table/field to perform a function.[/quote] Very true...less work too. :wink: --Taj