- Posts: 24
- Thank you received: 2
multiple prices o single product page
5 years 10 months ago #325810
by jokysax
multiple prices o single product page was created by jokysax
Hi,
how can I have multiple prices on single product page like on this website:
www.mastrant.com/on-line-shop/product/57...nt-s-6-mm-reflective
?
thank you
how can I have multiple prices on single product page like on this website:
www.mastrant.com/on-line-shop/product/57...nt-s-6-mm-reflective
?
thank you
Please Log in or Create an account to join the conversation.
5 years 10 months ago #325812
by nicolas
Replied by nicolas on topic multiple prices o single product page
Hi,
You can create a characteristic with one value per line via the menu Products>Characteristics.
Then, add that characteristic to your product, and add variants for the values of the characteristic in the product.
Finally, in the HikaShop configuration, set the "characteristic selection method" to "list" and it will display like on your link.
You can create a characteristic with one value per line via the menu Products>Characteristics.
Then, add that characteristic to your product, and add variants for the values of the characteristic in the product.
Finally, in the HikaShop configuration, set the "characteristic selection method" to "list" and it will display like on your link.
Please Log in or Create an account to join the conversation.
5 years 10 months ago - 5 years 10 months ago #325868
by jokysax
Replied by jokysax on topic multiple prices o single product page
thank you, but what in case I would like have "characteristic selection method" set to "list" only for one cattegory of products? on others categegories I would like have characteristic selection method" set to radio button or dropdown.
Last edit: 5 years 10 months ago by jokysax.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #325899
by nicolas
Replied by nicolas on topic multiple prices o single product page
Hi,
There is no option for that.
That would require some custom coding in the file show_block_characteristic.php via the menu Display>Views to switch the selection mode based on the categories in the array $this->categories
So if you're a developer or with the help of one you could do it.
There is no option for that.
That would require some custom coding in the file show_block_characteristic.php via the menu Display>Views to switch the selection mode based on the categories in the array $this->categories
So if you're a developer or with the help of one you could do it.
Please Log in or Create an account to join the conversation.
5 years 10 months ago - 5 years 10 months ago #325913
by jokysax
Replied by jokysax on topic multiple prices o single product page
I am a weak programmer, but I can insert conditions in code. Can you show sample code with categories conditions and what code and rows have to be changed in show_block_characteristic.php file?
Thank you
Thank you
Last edit: 5 years 10 months ago by jokysax.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #325928
by nicolas
Replied by nicolas on topic multiple prices o single product page
Hi,
Well, it's not about changing code in that view file, but more about adding custom code at the beginning of that view file.
For example:
That would set the list mode for the products where the main category is with the id xx.
Well, it's not about changing code in that view file, but more about adding custom code at the beginning of that view file.
For example:
Code:
<?php
$mainCategory = reset($this->categories);
if($mainCategory->category_id == xx)
$this->params->set('characteristic_display', 'list');
?>
Please Log in or Create an account to join the conversation.
5 years 10 months ago - 5 years 10 months ago #325980
by jokysax
Replied by jokysax on topic multiple prices o single product page
Thank you,
here is my code at the beginning of that view file:
<?php
/**
* @package HikaShop for Joomla!
* @version 4.4.0
* @author hikashop.com
* @copyright (C) 2010-2020 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
if(empty($this->element->characteristics))
return;
?>
<?php
$mainCategory = reset($this->categories);
if($mainCategory->category_id == 48)
$this->params->set('characteristic_display', 'list');
?>
<div id="hikashop_product_characteristics" class="hikashop_product_characteristics">
<?php
if($this->params->get('characteristic_display') != 'list') {
$app = JFactory::getApplication();
$config = hikashop_config();
$characteristics_dynamic_display = $config->get('characteristics_dynamic_display', 1);
$this->characteristics=&$this->element->main->characteristics;
it works, but list view is viewed as on attached picture. The characteristics block is viewed two times and text "cena" (english price) have big font. :huh:
here is my code at the beginning of that view file:
<?php
/**
* @package HikaShop for Joomla!
* @version 4.4.0
* @author hikashop.com
* @copyright (C) 2010-2020 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
if(empty($this->element->characteristics))
return;
?>
<?php
$mainCategory = reset($this->categories);
if($mainCategory->category_id == 48)
$this->params->set('characteristic_display', 'list');
?>
<div id="hikashop_product_characteristics" class="hikashop_product_characteristics">
<?php
if($this->params->get('characteristic_display') != 'list') {
$app = JFactory::getApplication();
$config = hikashop_config();
$characteristics_dynamic_display = $config->get('characteristics_dynamic_display', 1);
$this->characteristics=&$this->element->main->characteristics;
it works, but list view is viewed as on attached picture. The characteristics block is viewed two times and text "cena" (english price) have big font. :huh:
Last edit: 5 years 10 months ago by jokysax.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326011
by nicolas
Replied by nicolas on topic multiple prices o single product page
Hi,
Then please try adding that code to product / show.php instead.
Then please try adding that code to product / show.php instead.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326059
by jokysax
Replied by jokysax on topic multiple prices o single product page
thank you, it works now:)
Its possible to move product description to position as on attached picture ?
Thank you.
Its possible to move product description to position as on attached picture ?
Thank you.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326080
by nicolas
Replied by nicolas on topic multiple prices o single product page
Hi,
It should already be there but hidden with some CSS.
So just change / override that CSS to have it appear and add more CSS to hide the other one.
www.hikashop.com/support/documentation/1...ize-the-display.html
It should already be there but hidden with some CSS.
So just change / override that CSS to have it appear and add more CSS to hide the other one.
www.hikashop.com/support/documentation/1...ize-the-display.html
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds