Jump to content

Created A Custom Field To The Product, Problem On Product-List


Recommended Posts

Hi!

I created a custom field to the products called "suggestedrp" in db

I managed to display the field next to the price on the products page by

<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
<span>{l s='NET'}</span><span style="color: #000000;">  {l s='/SRP:'} {toolsConvertPrice price=$product->suggestedrp|string_format:"%.2f"}</span>
 
but when I paste this code to the product list tpl its just displays 0.00 as the value, where on the product page everything works fine.
Product list example: http://b2b.10r.hu/hu/24-sapkak 18j0us.jpg
Can you help?
Link to comment
Share on other sites

product-list.tpl is not related to product controller

to use new field in product-list.tpl it is necessary to change the "SELECT" function that selects the fields of products from database

product-list.pl is used by many modules / features in shop

so it will be necessary to check each "controller" that generates such list of product

Link to comment
Share on other sites

Could you help me what would it look like if the data im trying to access is at db-product-suggestedrp field

also i'd like to get this converted hen displayed.

 

Also my other question, is now that i added this custom price field to each product, it wont let me publish a product if it does not have a value. any solution for that?

Thanks a lot!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...