Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: product_types.php details

    Exactly what are you wanting to accomplish?

  2. #12
    Join Date
    Jul 2006
    Location
    Wiltshire, England
    Posts
    69
    Plugin Contributions
    0

    Default Re: product_types.php details

    I'm trying to accomplish adding configuration keys into the product layout table so that my "add a product type" code isn't a complete waste of time.

  3. #13
    Join Date
    Jul 2006
    Location
    Wiltshire, England
    Posts
    69
    Plugin Contributions
    0

    Idea or Suggestion Re: product_types.php details

    OK, this is the problem, and my solution.

    The product type layout table drives the product type settings editing screen.
    Without specific entries for the product type that screen has nothing on it.
    This makes it a bit useless being able to add a new type.

    The new entries have configuration keys, which are effectively the names of the entry lines on that screen, and they have to be unique across the whole table (dammit!). These keys have to match up with something I guess, which means keeping track of the changed names (I've only just thought of that! .

    The problem with this is that, when generating a new product type, how do I guarantee unique names? If the type I'm using to copy from has sensibly named keys (ie containing the product type name) it's not too hard, but if not?

    Alright, what I'm thinking to do is this :

    Generating a new product type I ask for a new name and old type to base the new type on.

    I'll find all the layout definitions for the product type that I'm copying from,
    if I can find the old product type name in the configuration keys I'll replace it with the new product type name.
    Otherwise I'll just add the new product type name!
    If someone can point me to a piece of code that finds the common text in a whole load of strings that'd help, but this will work anyway. I think.

    Comments welcomed.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Adding New Product_types
    By pigdestroyer in forum Setting Up Categories, Products, Attributes
    Replies: 153
    Last Post: 3 Oct 2022, 03:44 PM
  2. v150 Product Details php file
    By MarkoSiroki in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 22 Sep 2012, 05:33 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