Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / New PRODUCTS fields not showing

New PRODUCTS fields not showing

Views: 601

Results 1 to 3 of 3
30 Aug 2012, 2:04 AM
#1
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

New PRODUCTS fields not showing

Hi

I am using zencar 1.9.3h. I am having trouble displaying my new fields using the module tpl_product_info_display.php.

To back up, first I added the new fields to my database. Then I modified the code so I could see these fields in the admin area to populate them (collect.php and preview.php). I also use EZpopulate so I made sure I could get information into these fields that way. All is working well.

Now that I actually have data in these fields, I want to display them and they are not showing up. Right now, I am just trying to add one of the fields. These fields exist in my PRODUCTS table. First I added the fields main_template_vars.php in the $sql set. (I followed the directions written by chris at linususer).

Then I edited tpl_product_info_display.php in my custom template directory. First I stuck in the command

<?php echo 'test' ?> to make sure I was in the correct place. I checked my store and I was. Now I tried all of the following to get it to echo a new field: <?php echo $products_designer ?> <?php echo $products->fields['designer'] ?> <?php echo $products_info->fields['products_designer'] ?>

The last one is what the thread seemed to use. I read 12 pages of the "How to add new Properties to Products" but couldn't figure it out. A lot of them are old so I thought I'd ask for help.

Obviously I don't understand php. For example, I am not sure why they said to do $products_info....and not just use $products_designer as they do for predefined fields.

Thank you in advance. I hope I included enough information.

Linda

29 Nov 2012, 4:23 PM
#2
stumpyhead avatar

stumpyhead

New Zenner

Join Date:
Nov 2012
Posts:
4
Plugin Contributions:
0

Re: New PRODUCTS fields not showing

Hi

I'm trying to do the same thing myself, I don't suppose you've cracked it?

Regards

29 Nov 2012, 10:44 PM
#3
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: New PRODUCTS fields not showing

Search the Plugins area for "product fields". There are a few mods which do this. You could use one of them as is or just look at their code to see how to do it.

Rob