Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Posts
    224
    Plugin Contributions
    0

    Default ATTRIBUTES question

    So I have a attribute option name of Color. In the Option value I have all the colors i have. This all works great!!!
    The question. When I add a new product, then click to add attribute. Any way I can just click color and it automatically pick all the option values for color?

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,695
    Plugin Contributions
    11

    Default Re: ATTRIBUTES question

    This should get you started BUT... before you do, you need to add a color option value of "Please Select a Color" with the lowest sort order, set as display only, and default. They are the yellow and orange blocks in the attribute flags section.

    Without this setting, a customer can accidentally order the wrong color. This setting forces them to select the color they really want before the item can be added to the cart.

    https://www.zen-cart.com/showthread.php?t=108367
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  3. #3
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: ATTRIBUTES question

    Quote Originally Posted by dbltoe View Post
    add a color option value of "Please Select a Color" with the lowest sort order, set as display only, and default. They are the yellow and orange blocks in the attribute flags section.
    Great advise. I've added this value to all my products. Is there a way to add/adjust this setting (display only and default) globally?
    Thank you.
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

  4. #4
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: ATTRIBUTES question

    Quote Originally Posted by VDecalS View Post
    Great advise. I've added this value to all my products. Is there a way to add/adjust this setting (display only and default) globally?
    Thank you.
    Had attributes from one product been copied to another product or category, then the settings from the original product would have carried over (at least when performed in the attributes controller). Otherwise would suggest a sql query to be performed against the database to apply both of those settings to any product that has the expected options_id and options_values_id associated with the attribute.

    If you look in the option names manager, the number to the left of the option name is the options_id. Do the same for the options values manager to get the options_values_id. Then in admin->tools->install sql patches:

    Code:
    UPDATE products_attributes SET attributes_display_only=1, attributes_default=1 WHERE options_id = X AND options_values_id =Y;
    Where X is the number for the options_id and Y is the number for the options_values_id. Can be further refined by product or other such data.

    Or I guess, could just use options_values_id as that should be unique for each pair of option_name and option value.
    Last edited by mc12345678; 4 May 2017 at 04:52 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: ATTRIBUTES question

    Winged it! I ended up copying product attributes to categories one at a time. I had to adjust for some attributes I didn't want on some products for one category, because I started with the most convoluted product . All looks good now!
    Thanks a bunch!

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: ATTRIBUTES question

    Btw, if this is something you see as having to do frequently or in large batches (whether specifically attributes or other characteristics of product), there are other tools (plugins) that are designed to do large changes in short/quick bursts. They are all based off of the EasyPopulate concept.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,695
    Plugin Contributions
    11

    Default Re: ATTRIBUTES question

    Quote Originally Posted by mc12345678 View Post
    Code:
    UPDATE products_attributes SET attributes_display_only=1, attributes_default=1 WHERE options_id = X AND options_values_id =Y;
    If all your actual attributes have a price, weight or some other identifiable item, it can be done quicker. For instance, if all regular attributes have a price assigned, you can use
    Code:
    UPDATE products_attributes SET attributes_display_only=1, attributes_default=1 WHERE options_values_price=0
    If all your "Plese ..." options are the same sort order (they should be) you can use products_options_sort_order instead.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  8. #8
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: ATTRIBUTES question

    I've just gotten a new color (NUT BROWN) to add to my vinyl decal attributes, but I only want to add (not replace) to products that currently have the color attribute of ORANGE.
    Can someone let me know if the following SQL patch work?

    Code:
    ADD products attributes options_values_id = 73 WHERE options_id = X AND options_values_id = Y
    73=NUT BROWN
    X=color
    Y=ORANGE

    Thank you.
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

  9. #9
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: ATTRIBUTES question

    That's a new one. :) oh, wait you're asking about the admin side, I was thinking you wanted a customer to be able to click on the color option name and select all of the option values.

    Two things can somewhat be done. Can copy a product that already has "all" of the attributes desired to be added and then modify the product information to suit. Or from the perspective described, if after you select the option name, then select the first option value, hold the shift key and press the end key, all attributes will be selected.

    Otherwise, perhaps additional javascript code can be added to support a double click of the option name (ondblclick) to select all of the option values for that option name.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Attributes question
    By Beth-katherine in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 31 Mar 2007, 04:03 AM
  2. Attributes Question
    By lhhgbh in forum Customization from the Admin
    Replies: 1
    Last Post: 30 Jan 2007, 11:37 PM

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