Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default How do you identify linked products in different categories? Same model number??

    Hi

    I have lots of different categories to represent different ranges of a product. But in each category are the same products linked. They are all the same price and everything so I dont want duplicate them.

    But when a customer buys a product the model numbers are the same across all categories, and the category name is not appearing in the order.

    So is there any way to identify which products are ordered, or which categories they came from? We do not want the category name in the title of each product.

    Thanks

  2. #2
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default Re: How do you identify linked products in different categories? Same model number??

    Clearly I have completely overlooked the fact that a linked product is the EXACT same product as in the master category with no linkage to the category you viewed it in. I think this is a big issue for linked products, I am sure there would be many people who would like to know which category the linked product came from. Separate products and attributes would mean a massive database for my site..

    So I may have a workaround that I think works well but does mean some hacking (all template files though).

    I created a custom text field and managed to insert the category name into this to pass as an attribute of the purchased product.

    Here is an overview if interested:-

    • I created a Text attribute called Range (which is our category)
    • I have hidden this box with "display: none" (the only way to identify it was hack attributes.php and tpl_modules_attributes.php to add a class to each attribute "wrapperAttribsOptions" div to identify it).
    • Then I added in custom input type="hidden" box with the name of the above hidden text attribute.
    • Using Ultimate SEOs I added the cPath onto the product URLs. Luckily this DOES keep the actual category you are in rather than the master one!
    • Then using function zen_get_category_name() I was able to get the Category name from the cPath, which I then inserted as the Value in the hidden input form, which when submitted will submit this value as the textbox attribute.

    So this means the category of the linked product is passed to the cart as an attribute of the product which is fine.

    The above would be quite straightforward to include, so would be good if next Zencart version allowed you to pass this category info from a linked product.

  3. #3
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default Re: How do you identify linked products in different categories? Same model number??

    There are of course problems with things like New, Featured, Bestsellers, etc. which cannot link to a specific category so i have disabled all those and have to add links to products in manually if needed.

 

 

Similar Threads

  1. Replies: 7
    Last Post: 21 Nov 2015, 08:44 AM
  2. How do I get the Model Number on the same line as Model??
    By MandyMac in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 28 Jul 2014, 04:27 AM
  3. Same model number, different manufacturers/products
    By farmex in forum General Questions
    Replies: 7
    Last Post: 9 Dec 2011, 09:02 PM
  4. Linked products in same categories?
    By Kitty in forum General Questions
    Replies: 7
    Last Post: 8 May 2008, 08:06 PM
  5. Different Model number for different attribute
    By underworldmagic in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 25 Dec 2006, 11:05 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