How to use a custom field in product listing table
- jeff_heilman@comcast.net
-
Topic Author
- Offline
I have created a custom field named salemethod which contains the unit of measure for the product being sold (Pc, Set, Case, etc). I have managed to get it to appear on the product page but would like to also have it show up on the product listing page with the price. Instead of reading "$40.00 when you buy 5" I would like it to read "As low as $40.00 per SET. Most of my items have minimum quantity prices set up.
Where can I accomplish this and can it be done the same I did it on the product page?
In the menu Display -> Views, edit the product / listing_price.php file.
In this file, replace:
echo JText::_('PER_UNIT');
By:
if(isset($this->element->main)) echo JText::_($this->element->main->salemethod);
elseif(isset($this->row)) echo JText::_($this->row->salemethod);
else echo JText::_($this->element->salemethod);
Thank you,
Jeff
www.legacyetchings.com
Please Log in or Create an account to join the conversation.
Yes it can be done in the same file, I think that you have to add another check on the line "echo JText::_('PER_UNIT');" to change the text depending on if it's in a listing or a product page.
Please Log in or Create an account to join the conversation.
- jeff_heilman@comcast.net
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- jeff_heilman@comcast.net
-
Topic Author
- Offline
This is the last thing I really need to get finished before I start to promote my site and start selling.
You've been great, thank you!
Please Log in or Create an account to join the conversation.
And the second part, replace the line "echo echo JText::_('PRICE_BEGINNING');".
Please Log in or Create an account to join the conversation.
- jeff_heilman@comcast.net
-
Topic Author
- Offline
Could you please tell me what I did wrong? Thank you!
Jeff
Please Log in or Create an account to join the conversation.
I think this line
Please Log in or Create an account to join the conversation.
- jeff_heilman@comcast.net
-
Topic Author
- Offline
Could you recommend a freelancer that could do this for me?
Please Log in or Create an account to join the conversation.
polishedgeek.com/
Please Log in or Create an account to join the conversation.
I want to have a summary description and a couple of text fields on the product listing page, if i create custom fields how would I go about dispaying those fields on the product listing page.
I have followed this thread but I am still unclear any help would be appreciated
Please Log in or Create an account to join the conversation.
- jeff_heilman@comcast.net
-
Topic Author
- Offline
I've been able to get this to work: www.hikashop.com/en/support/documentation/faq.html#each but haven't had much luck beyond that. You might be able to build on it.
My .php skills are minimal, I know just enough to screw things up.
Thanks and good luck!
Please Log in or Create an account to join the conversation.
I cannot find the custom field for product sections discussed below in my configuration area so I assume that is because I don't have a commercial version.
Custom item fields don't appear on the front end.
When you create a custom field, don't forget to enable the "Front-end" option.
Be careful, when you create the custom field, be sure that you set the good table , which is the "item" table, not the "product" table.
For products listings, enable the default option in System->configuration->display, enable "Display custom item fields" in the Default parameters for products.
For products listings, enable the same option, in Display->content menus/modules.
Please Log in or Create an account to join the conversation.