multiple prices o single product page

  • Posts: 22
  • Thank you received: 2
4 years 4 months ago #325810

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

Please Log in or Create an account to join the conversation.

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325812

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.

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
4 years 4 months ago #325868

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: 4 years 4 months ago by jokysax.

Please Log in or Create an account to join the conversation.

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325899

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.

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
4 years 4 months ago #325913

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

Last edit: 4 years 4 months ago by jokysax.

Please Log in or Create an account to join the conversation.

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325928

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:

<?php
$mainCategory = reset($this->categories);
if($mainCategory->category_id == xx)
 $this->params->set('characteristic_display', 'list');
?>
That would set the list mode for the products where the main category is with the id xx.

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
4 years 3 months ago #325980

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:

Attachments:
Last edit: 4 years 3 months ago by jokysax.

Please Log in or Create an account to join the conversation.

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 3 months ago #326011

Hi,

Then please try adding that code to product / show.php instead.

Please Log in or Create an account to join the conversation.

  • Posts: 22
  • Thank you received: 2
4 years 3 months ago #326059

thank you, it works now:)
Its possible to move product description to position as on attached picture ?
Thank you.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 3 months ago #326080

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum