Re: How-To: Add new Properties to your Products
Thanks jane! I am going to add that tomorrow afternoon.
This is somewhat related and since I'm not sure how to go about it, maybe someone has already combined new fields to auto-generate a global field.
More specifically, how do I combine several of my new product detail fields (along with the mfr ID field) so that [FONT="Courier New"]zen_products_description . products_name[/FONT] is created automatically? Essentially what is happening is that the products_name field is made up of several other fields. There is no need for it to be typed. IOW, the product name is controlled and consistent across the site.
Excusing the code, let's say the combined field protocol for products_name is:
[FONT="Courier New"]$manufacturers_id . ' » ' . $details_model_name . $details_style . ' » ' $details_size . $details_orientation . ' » ' . $details_color[/FONT]
For example, when displayed, the products names would look like:
- ACME » Medallion Trampoline » 18' round » blue and black
- SILLY » Trampoline » 9'x12'
- AVD » Slide » 12' high curlicue » clear painted aluminum
So, all the data is pulled from fields in the zen_products table (plus using the text conversion of manufacturer_id) based upon a conditional (the right angle brackets are only included if the following field contains something) and needs to be written into the products_name field in the zen_products_description table.
I've tried searching but my keywords are too general to get anywhere. Anybody have an idea of what PHP code is needed to do this?
Re: How-To: Add new Properties to your Products
Jane,
I have modified the files, and Im sorry for such a questions, but....
I am having issues displaying the info in tpl_moduals_featured_products.php
I'm calling calling $case = $product_info->fields['products_case'];
and also tried $case = $featured_products>fields['products_case'];
Im then putting the var into this statement :
<div class="p_left"><br style="line-height:9px;"/>Case Price: <a href="'.$href.'">'.$price.'<br/>'.$case.'<br/>'.$case2.'<br/>'.$case3.' </a>
When I echo, I'm getting no output, so the variable I put it into is empty. Im sorry to seem so needy, but could you lend a tip?
Thanks
Re: How-To: Add new Properties to your Products
Hi
Your case may be bit diffrent than mine but if you send my your email I can send you all files which i modified so you can have look. mail me if you intredted.
Regards
Janek
Re: How-To: Add new Properties to your Products
swne (at) sbcglobal.net....THANKS!!
Re: How-To: Add new Properties to your Products
I've got everything working on the search results/ product listing including the sort for my custom field. Problem is that it always displays on the right, after the built in fields. Where is this order set in the code? (I know it's sent in admin-> product listing for the existing fields)
Thanks,
Gregg Short
GShort.com Web Marketing & Design
Re: How-To: Add new Properties to your Products
Thanks for this tutorial!
But...
I don't know why, but my new Properties is not working correctly.
First of all, the value that I put on the admin page for a product is not put in the DB
Other problem: the new field not appear in the description in the store (client)
Can you help me?
I am a newbie and I don't "speak" PHP for the moment.
my email is ipuce [at] videotron.ca
Thank you!
Re: How-To: Add new Properties to your Products
hey...I just implemented a product 'volume' property in my shopping cart by following the directions on the front page of this string. I wanted to say THANKYOU!!!! Your instructions have guided me exactly where I needed to go and it has taken a lot of stress off of my shoulders. Thankyou so Much! I even feel a slight bit confident now in mucking around with deep zencart. Sweet dreams! You've given me mine =)
Re: How-To: Add new Properties to your Products
I have my new property showing up but it does not show the name of it. I am wanting to add an Item Number field to my products. I have everything showing up just fine in the admin area but its just showing the number on my actual store. here is an example http://silentshadow.oxyhost.com/inde...roducts_id=123
As you can see it just shows "111" and thats it. It does not have the Item Number: in front of it. Any suggestions?
Re: How-To: Add new Properties to your Products
Try...
Code:
<?php if (!empty($product_info->fields['custom_item_number'])) echo '<li>Item Number: ' . $product_info->fields['custom_item_number'] . '</li>'; ?>
...where custom_item_number is the data field you added to the products table in the database.
Re: How-To: Add new Properties to your Products
Quote:
Originally Posted by
cartguin
Try...
Code:
<?php if (!empty($product_info->fields['custom_item_number'])) echo '<li>Item Number: ' . $product_info->fields['custom_item_number'] . '</li>'; ?>
...where custom_item_number is the data field you added to the products table in the database.
THANK YOU!!! I had to edit it just a little to get it to work but it works. thanks so much!