The model number does get displayed in the confirmation e-mail at least.
The Read Only Attributes were designed specifically to not be part of the cart ... they are just there for display ...
They only display on the product _info page but are never included in the cart when the Product is added ...
These Read Only Attributes make a handy way to have a display of information on multiple Products that read the Attribute as text ... then, if that text needs to be changed, it can be changed once and reflect that change on all Products that use them ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Well the model number will work for certain items...however, I don't believe you can change the model number with the attributes unless you maybe use some javascript to "listen" for the change in the radio button, drop-down or check-box. What I've done so far is I've included the SKU as part of the option value. So for instance, if the customer chooses the quantity ->100 count SKU 5454 or the quantity->200 count SKU 5555 . However, it would be nice if I could have the SKU as a separate attribute to the product; and this is where the read only comes in as I would not want my customers "selecting" the SKU.
I realize that the read-only attributes are for display purposes and are handy to display 1 or 2 messages on many products. However, there just has to be a way that they will display on the confirmation email or in the shopping cart. I still don't quiet understand why it wouldn't display if it is looping through the $product['attributes'] array...the "reaad-only" attributes have to be stored somewhere in that field?
TH
A read-only attribute will not get you a bit nearer to reflecting the real attributes selected by the customer. The model number is at least processed through already, though I doubt it is feasible to change that on the fly per order, since it is in the db. I think what you would want is code that would take the attribute id on order submission and display the corresponding SKU in certain places (shopping cart, order confirmation...).
Does each attribute have a full SKU, or is the variant SKU composed of base + attribute values? Do you have multiple attributes on products, such that a product with A1 and B3 is different from one with A1 and B2?
The Stock by Attributes mod might help you distinguish these, though it doesn't have SKU by attribute. I have heard talk of people trying to implement that, but no reports of success. No matter what, for a robust implementation of SKU by attribute, you will need a new database table or field(s) relating product id, attribute id(s) and SKUs.
^I think you are right. So what you are saying is that each attribute that you have has it's own record in the database. So therefore, I could specify that each attribute that I apply to the product would have it's own $product['attribute_sku'] field and I would then be able to display that in certain places (including the confirmation email)??
This seems like it would involve a wee bit of coding and I haven't taken too close of a look at the orders.php file (which is where this would have to be done). furthermore, to make it user-friendly I would have to familiarize myself with the admin side so I can submit the SKU to the database and assign it to it's $products['attribute_sku'] field.
Anyone love coding a nice little plugin???
^Yes each attribute has a full unique SKU. I don't have multiple attributes as of right now. Here is my exact situation. So for product A you can order different amounts(quantity) so I called this attribute Quantity. Now there is a 90 count (Quantity value) and a 180 count (Quantity value). If you select Product A, 90 count (SKU: 4545) you would be selecting a different SKU than if you selected Product A, 180 count (SKU: 5555)Does each attribute have a full SKU, or is the variant SKU composed of base + attribute values? Do you have multiple attributes on products, such that a product with A1 and B3 is different from one with A1 and B2?
Too bad... it would make it easy if the SKU for the product with attribute could be built from base product SKU + attribute SKU fragment.
Each option name and each option value has its own id, and when one of these values is applied to a particular product, it acquires its own unique attribute id (which would be stored in the db, keyed to product, option name and option value). You could add a new field to that table for attribute_sku, and the required code to insert it from admin and retrieve it for display/use.
Inserting would probably best be done in the Attributes Controller.
You might create a function like get_attribute_sku_from_id($attrib_id) so that you could just call this from any place you need to use it.
$attrib_id will be available wherever the order is being handled.
Or maybe you could change the core lookups to retrieve attribute_sku when attribute_id is being fetched.
Which table are you referring to?
The products_attribute table I'm assuming.
So I'm still curious how this function would look. When you create an product option that goes into the product_options table
and when you assign a option value to that it goes into the product_options_values table
When you assign an product option and a product option value to a particular product that becomes an attribute and gets it's own unique record in the products_attribute table
so what you are saying is that since each product attribute has it's own unique attribute_id you could create another field that stores the attributes_sku in that table. Then when you wanted to pull out the SKU for a product you could call the unique attribute_id and filter out the attributes_sku?
The attribute_sku value would all be controlled within the attributes_controller.php and you would call to it in orders.php?
Bookmarks