Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Apr 2011
    Posts
    38
    Plugin Contributions
    0

    Default Re: Display Read Only attribute in cart

    Quote Originally Posted by tthenne View Post
    Yeah I could use the Model: as an SKU system
    ^Check that...It doesn't look like the Model # gets carried into the shopping cart either, which makes me wonder if it gets processed on the orders/email/invoice...anyone know?

  2. #12
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,057
    Plugin Contributions
    25

    Default Re: Display Read Only attribute in cart

    The model number does get displayed in the confirmation e-mail at least.

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,403
    Plugin Contributions
    6

    Default Re: Display Read Only attribute in cart

    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!

  4. #14
    Join Date
    Apr 2011
    Posts
    38
    Plugin Contributions
    0

    Default Re: Display Read Only attribute in cart

    Quote Originally Posted by gjh42 View Post
    The model number does get displayed in the confirmation e-mail at least.
    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

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,057
    Plugin Contributions
    25

    Default Re: Display Read Only attribute in cart

    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?

  6. #16
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,057
    Plugin Contributions
    25

    Default Re: Display Read Only attribute in cart

    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.

  7. #17
    Join Date
    Apr 2011
    Posts
    38
    Plugin Contributions
    0

    Default Re: Display Read Only attribute in cart

    Quote Originally Posted by gjh42 View Post
    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...)
    ^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???

    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?
    ^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)

  8. #18
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,057
    Plugin Contributions
    25

    Default Re: Display Read Only attribute in cart

    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.

  9. #19
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,057
    Plugin Contributions
    25

    Default Re: Display Read Only attribute in cart

    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.

  10. #20
    Join Date
    Apr 2011
    Posts
    38
    Plugin Contributions
    0

    Default Re: Display Read Only attribute in cart

    Quote Originally Posted by gjh42 View Post
    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.
    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?

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Something like the read only attribute that will display in the cart
    By DannyVarley in forum General Questions
    Replies: 0
    Last Post: 31 May 2013, 04:19 PM
  2. Hiding READ ONLY attribute
    By Endre in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Oct 2009, 11:17 PM
  3. read only attribute
    By bmpt in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 Apr 2009, 10:52 PM
  4. Read Only Attribute
    By beowulf1066 in forum General Questions
    Replies: 3
    Last Post: 1 Mar 2007, 01:52 AM
  5. read only attribute value size too small/ import html in read only attribute value
    By nazzaw in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 22 Jan 2007, 03:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR