Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Aug 2013
    Location
    Redlands, Ca
    Posts
    11
    Plugin Contributions
    0

    Default Product Type Question

    Okay I've been poking around Zen Cart for a while and I'm still kind of new at this. I have an idea to create a couple product types and I have had a thought that could help me combine them into one product type. I just don't know if this will work. To explain my idea I'm going to use the music product type. When entering a new music product in the admin area and I leave the selection to none on music genre, record company, or record artist, is it possible on the product display page to only display any of these only when a value other than none is entered? or does it already have this capability?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Product Type Question

    This is something that could be controlled on the applicable template file. There is a small amount of existing control to show fields all the time or not, you would want to add your data check at the same point that that check is performed if the display is true and there is data (zen_not_null($mydata)) then display that field.

    See: includes/templates/YOUR_TEMPLATE/templates/tpl_product_music_info.php for starters. If not already in that folder, then copy the file of the same name from includes/templates/template_default/templates before editing.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2013
    Location
    Redlands, Ca
    Posts
    11
    Plugin Contributions
    0

    Default Re: Product Type Question

    Okay so I played with the music product type and I did notice that when the field for Record Artist, Record Company, and Music Genre fields are left to none that it doesn't show up on the product display page. Unfortunately I have never fully learned to program in PHP and I'm not sure what the code looks like so I can apply this to other fields that I want to add. Maybe someone could tell me which file to look at and post the code that actually does it. I'd really appreciate it.

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

    Default Re: Product Type Question

    So, seeing as the fields originally identified seem to operate as desired and the level of knowledge identified, the changes needed to add additional fields without the use of a plugin such as numinix additional fields are many.

    Such files include but are not limited to the collect, preview, and update files for the admin product type, then the header_php.php, main_variables of the pages folder and associated template file for the product type all on the store side.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v154 Question regarding Auction Product Type Module
    By dfontana in forum General Questions
    Replies: 0
    Last Post: 24 Apr 2015, 08:05 PM
  2. v151 Product-Type Question
    By sle39lvr in forum General Questions
    Replies: 2
    Last Post: 6 Apr 2015, 10:23 PM
  3. A quick question to ask about Book product type
    By sjbglx in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 23 Sep 2010, 10:36 PM
  4. Auction Product Type: Can't add a product of the type.
    By sw0rdz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 02:11 AM
  5. product type selection question
    By KimberleyB in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 30 Oct 2006, 04:38 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