- Posts: 214
- Thank you received: 1
Show Delivery Price on Product View
12 years 10 months ago #132181
by matps
Show Delivery Price on Product View was created by matps
Hi Guys,
I've got a question for my website www.craftkeg.com/index.php/all-products
I would like to show the Brewers of the products on my products page. So the Breweries are set up as catergories, so my question is can I add a certain Category to the products listing?
I've got a question for my website www.craftkeg.com/index.php/all-products
I would like to show the Brewers of the products on my products page. So the Breweries are set up as catergories, so my question is can I add a certain Category to the products listing?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 10 months ago #132194
by Mohamed Thelji
Replied by Mohamed Thelji on topic Show Delivery Price on Product View
Hi,
I'll need more information about what your really want to do, and of where do you exactly want to add the products of your "Brewers" category through some screenshots for example.
I'll need more information about what your really want to do, and of where do you exactly want to add the products of your "Brewers" category through some screenshots for example.
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132205
by matps
Replied by matps on topic Show Delivery Price on Product View
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132233
by Xavier
Replied by Xavier on topic Show Delivery Price on Product View
Hi,
You can create custom fields in the table "product", set the name as "Brewer". Then in the product edition page, enter the brewery of the product in this custom field.
And finally in the options of your menu/module display the custom fields to have the brewery displayed in the products listing.
Else you can edit the view "product / listing_img_title" to display the category of the product, but it require php skills.
You can create custom fields in the table "product", set the name as "Brewer". Then in the product edition page, enter the brewery of the product in this custom field.
And finally in the options of your menu/module display the custom fields to have the brewery displayed in the products listing.
Else you can edit the view "product / listing_img_title" to display the category of the product, but it require php skills.
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132248
by matps
Replied by matps on topic Show Delivery Price on Product View
Hi Xavier,
Thanks for that, I've added it into the table and set the menu to display custom filters (I assume that is what I should be doing). However the only place it appears to show is in the product page itself, not in the listing...
www.craftkeg.com/index.php/all-products/...ct/375-anarchy-lager
Thanks for that, I've added it into the table and set the menu to display custom filters (I assume that is what I should be doing). However the only place it appears to show is in the product page itself, not in the listing...
www.craftkeg.com/index.php/all-products/...ct/375-anarchy-lager
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132371
by Xavier
Replied by Xavier on topic Show Delivery Price on Product View
Hi,
Yes you're right, my mistake the custom field of the product table are not displayed in the listing, so you have to edit the view "product / listing_img_title" via the menu Display > Views and add the code:
Yes you're right, my mistake the custom field of the product table are not displayed in the listing, so you have to edit the view "product / listing_img_title" via the menu Display > Views and add the code:
Code:
echo 'Brewer: '.$this->row->YOUR_CUSTOM_FIELD_ALIAS;
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132400
by matps
Replied by matps on topic Show Delivery Price on Product View
Thanks Xavier,
So I've got the current code in my "product / listing_img_title"
<p><strong>Container: </strong><?php $class = hikashop_get('class.category');
$manufacturer = $class->get($this->row->product_manufacturer_id);
echo $manufacturer->category_name; ?></p>
<p><strong>Brewer: </strong><?php echo 'Brewer: '.$this->row->YOUR_CUSTOM_FIELD_ALIAS; ?></p>
and I get this result - www.craftkeg.com/index.php/all-products/.../127-anarchy-brew-co (please not I've only updated Anarchy Lager so far)
This is my configuration in the backend...
Your help is greatly appreciated.
So I've got the current code in my "product / listing_img_title"
<p><strong>Container: </strong><?php $class = hikashop_get('class.category');
$manufacturer = $class->get($this->row->product_manufacturer_id);
echo $manufacturer->category_name; ?></p>
<p><strong>Brewer: </strong><?php echo 'Brewer: '.$this->row->YOUR_CUSTOM_FIELD_ALIAS; ?></p>
and I get this result - www.craftkeg.com/index.php/all-products/.../127-anarchy-brew-co (please not I've only updated Anarchy Lager so far)
This is my configuration in the backend...
Your help is greatly appreciated.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 10 months ago #132432
by Mohamed Thelji
Replied by Mohamed Thelji on topic Show Delivery Price on Product View
You should try it with this code :
Code:
<p><strong>Container: </strong><?php $class = hikashop_get('class.category');
$manufacturer = $class->get($this->row->product_manufacturer_id);
echo $manufacturer->category_name; ?></p>
<p><strong>Brewer: </strong><?php echo $this->row->brewer; ?></p>
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132446
by matps
Replied by matps on topic Show Delivery Price on Product View
That has worked perfectly, thank you both!
Let me just say that the help I and other users on this forum receive from you guys is always top notch!
Let me just say that the help I and other users on this forum receive from you guys is always top notch!
Please Log in or Create an account to join the conversation.
Time to create page: 0.264 seconds