Totally Zenned
- Join Date:
- Sep 2008
- Location:
- WA
- Posts:
- 559
- Plugin Contributions:
- 0
Can't get added fields to show on product page when I could in version 1.3.9h
Hello
I am still working on my upgrade and enjoying what Ive learned. But I am stumped on this one. There are basically 2 files that I know I have an error in and I can't figure which one. Like others, I don't know php but learn from doing. I'm not getting errors, it just isn'[t showing me my fields.
- includes/modules/pages/product_info/main_template_vars.php
Here I added my new fields to the sql call:
$sql = "select p.products_id, pd.products_name,
pd.products_description, p.products_model,
p.products_quantity, p.products_image,
pd.products_url, p.products_price,
p.products_tax_class_id, p.products_date_added,
p.products_date_available, p.manufacturers_id, p.products_quantity,
p.products_weight, p.products_priced_by_attribute, p.product_is_free,
p.products_qty_box_status,
p.products_quantity_order_max,
p.products_discount_type, p.products_discount_type_from, p.products_sort_order, p.products_price_sorter,
p.products_kind, p.products_designer, p.products_collection, p.products_color, p.products_content,
p.products_subtype, p.products_theme, p.products_size, p.products_width, p.products_length,
p.products_ebay_title, p.products_upc
$product_info = $db->Execute($sql);
(I think the above line is where product_info gets filled by the current product from the database)
-
Then I notices that below this, the code sets up variables (not sure if correct name) for each of the fields, like:
$products_weight = $product_info->fields['products_weight'];
and since I need my $product_fields defined, I added
$products_designer = $products_info->fields['p.products_designer'];
$products_collection = $products_info->fields['products_collection'];
$products_theme = $products_info->fields['products_theme'];
$products_color = $products_info->fields['products_color'];
$products_content = $products_info->fields['products_content'];
$products_width = $products_info->fields['products_width'];
$products_kind = $products_info->fields['products_kind'];
- Then, over in /includes/templates/MYTEMPLATE/templates/tpl_product_info_display.php is the code for displaying on the page. I removed what I did for version 1.3.9h because it didn't work with the way 1.5.1 is written.
Here I added:
<?php echo (("hi") . ("hi") . '</li>') ?> <?php echo ((TEXT_PRODUCT_DESIGNER) . $products_designer) . "\n"; ?> <?php echo ((TEXT_PRODUCT_COLLECTION) . $products_collection ) . "\n"; ?> <?php echo ((TEXT_PRODUCT_THEME) . $products_theme ) . "\n"; ?> <?php echo ((TEXT_PRODUCT_COLOR) . $products_color ) . "\n"; ?>and I get (the hi was for seeing if I made it to this file):
Manufactured by: Kaufman
hihi Designer: Collection: Theme: Color:
I just can't get it to spit our $products_designer and the other fields. I added the constants to my english php and they show up but I could use some help this time getting the fields to show up.
I scanned the forum for ideas and will continue to do so but any help would be great.
Thanks
Linda
PHP version 5.3.28
MySQL 5.5.32-31.0-log
PS: If anyone knows of a good PHP manual, please share.
Manufactured by: Kaufman
hihi Designer: Collection: Theme: Color:
So I assume that $products_designer and my other new fields are not getting set correctly or they are getting ov
and since they use these fields in the file that displays them I added fields for my code: