Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Posts
    3
    Plugin Contributions
    0

    Default Creating Unique Product Ids based on Attributes

    I've been searching for through the forums and add-ons for a solution to this, but I have found very little. If there is a solution already posted, please point me in the right direction.

    Basically, my store will have products that vary in size and flavor. Each combination has a different product number that has to be included on the packing slip when I send it to my supplier. I could list each item separately, but that would turn 300 items into around 3000. Is there a simpler solution?

    If not, I will have to code an answer. Here is my initial idea, let me know if you think this will work.

    1. Code a checkbox into the New Product Form asking if this product will use attributes. (This will determine whether the Product Number pulls from New Product or from Attributes Controller.
    2. Since there is not a way (that I know of) to create dependent attributes, I will make only one attribute and call it Size/Flavor and make the Option Names Vanilla - 6oz, Vanilla - 12oz, etc.
    3. Then under Adding New Attributes, Prices and Weights I will have to add a new text box that accepts and stores a New Product ID(in a new variable).
    4. Lastly change the invoice to look for and pull that variable to the receipt.

    or..

    It sounds easy on paper, but what issues might I run into with this..

    Thanks in advance for your help.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Creating Unique Product Ids based on Attributes

    First off there is no table or record in a table yo store this

    Then look at the # of pages when buying something as each will have to have code for this

    Look at shopping_cart.php as this will have to have code to assemble and price it

    Look at the admin files for pages that will need coding

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Creating Unique Product Ids based on Attributes

    The flavor doesn't affect the price, does it? If not, there is no reason not to have an attribute for each (Flavor and Size); you would read the identifier from each attribute and combine them for the product identifier.

    What happens if you set up a product without attributes, and later decide to use them? You would have to remember to go back and check the box in the product editing page. It might be better to automate this - check if the product has attributes, and use them if they are present; otherwise use just the base product id. This simplifies admin coding and the user interface while making it more reliable.

    You might use internal code that takes the product and attribute ids and does a lookup to translate that into a relevant supplier model number, to avoid another admin change and user interface. I would think creating a single file or table of corresponding values would be better than inputting things manually for each product attribute.
    Last edited by gjh42; 9 Mar 2011 at 04:54 PM.

  4. #4
    Join Date
    Mar 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: Creating Unique Product Ids based on Attributes

    Thank you for your response..

    Quote Originally Posted by gjh42 View Post
    The flavor doesn't affect the price, does it? If not, there is no reason not to have an attribute for each (Flavor and Size); you would read the identifier from each attribute and combine them for the product identifier.
    The flavor doesn't affect the price, only the product number. I was thinking that giving each product only one unique attribute that combines flavor/size would be a simpler set up than doing a lookup with a base products, attribute 1 and attribute 2 to get the product #.

    Quote Originally Posted by gjh42 View Post
    What happens if you set up a product without attributes, and later decide to use them? You would have to remember to go back and check the box in the product editing page. It might be better to automate this - check if the product has attributes, and use them if they are present; otherwise use just the base product id. This simplifies admin coding and the user interface while making it more reliable.
    After I posted, I considered under Attribute Options having an attribute listed as 'None' that would have to go onto all products that don't have attributes, but doing a background check might be just as easy.

    Quote Originally Posted by gjh42 View Post
    You might use internal code that takes the product and attribute ids and does a lookup to translate that into a relevant supplier model number, to avoid another admin change and user interface. I would think creating a single file or table of corresponding values would be better than inputting things manually for each product attribute.
    Does Zen Cart give each attribute a unique identifier for each product or would i have to input that?

    Thanks again.. Also out of curiosity, how much do you think it would cost me to have a programmer do this?

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

    Default Re: Creating Unique Product Ids based on Attributes

    Each option name, each option value, and each attribute selection when applied to a product has a unique id. You could work on a per-product basis and translate the attribute id(s) to a model number, or you could calculate from the option id and value id combined with product id if "strawberry" and "6 oz" always give the same elements in the supplier's code.

    I don't expect it would be cheap to get even this streamlined version of the functionality coded, but we aren't supposed to discuss prices in the forum. You can look in Commercial Help Wanted to get quotes.

  6. #6
    Join Date
    Mar 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: Creating Unique Product Ids based on Attributes

    Ok, I'll give it a whirl and see what happens. Thanks again for your help.

 

 

Similar Threads

  1. v151 Help to create list of unique products based on attributes applied
    By philip937 in forum General Questions
    Replies: 7
    Last Post: 18 Aug 2014, 01:16 PM
  2. v151 attribute boxes with unique ids help
    By Mikey D in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Feb 2013, 01:11 AM
  3. Need to set up Unique downloads based on text attributes
    By nyrad in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 5 May 2010, 05:33 PM
  4. Trying to send unique e-mails based on product ordered
    By Greg Dean in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 12 May 2009, 11:55 PM
  5. 1 product, 1 set of attributes, many product ids
    By freef4ll in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 4 Jan 2007, 09:52 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