Retail Price doesn't show up in Show Pro GK5 module

  • Posts: 14
  • Thank you received: 0
8 years 7 months ago #253605

-- HikaShop version -- : 3.2.4

Hi everyone,

can you explain me how to show the Retail Price on a Show Pro GK5 module ?
Now It showing up only custom price.
You can find attacched 2 screenshoot.

Thanks in advance

Attachments:

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
8 years 7 months ago #253607

Hi,

We don't know how the module Show Pro GK5 is coded so I can't tell you because I don't know.
That's something you need to ask to the developer of that module.

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

  • Posts: 14
  • Thank you received: 0
8 years 7 months ago #254262

Hi Nicolas,

I found the bit of code concerned "hikashop_product_price_full" :

defined('_JEXEC') or die('Restricted access');
?><?php
$class ='';
if(!empty($this->row->prices) && count($this->row->prices)>1){
$class = ' hikashop_product_several_prices';
}
if(isset($this->element->main->product_msrp) && !(@$this->row->product_msrp > 0.0) )
$this->row->product_msrp = $this->element->main->product_msrp;
if(isset($this->row->product_msrp) && @$this->row->product_msrp > 0.0 && JRequest::getCmd('layout') == 'show' && $this->params->get('from_module','') == ''){ ?>

<span class="hikashop_product_price_full<?php echo $class; ?>">
<?php
if(empty($this->row->prices)){
echo JText::_('FREE_PRICE');
}else{
$first = true;
echo JText::_('PRICE_BEGINNING');
$i=0;

if(isset($this->row->product_msrp) && @$this->row->product_msrp > 0.0 && JRequest::getCmd('layout') == 'show' && $this->params->get('from_module','') == ''){
echo '<span class="hikashop_product_our_price_title">'.JText::_('PRODUCT_MSRP_AFTER').'</span> ';
}


and the bit of code concerned the views in NSP GK5 :

// function used to show the store details
static function store($config, $item) {
$html = '<div class="nspHikashopBlock">';
//
$currencyHelper = hikashop_get('class.currency');
$mainCurr = $currencyHelper->mainCurrency();
$app = JFactory::getApplication();
$currCurrency = $app->getUserState( HIKASHOP_COMPONENT.'.currency_id', $mainCurr );
$msrpCurrencied = $currencyHelper->convertUniquePrice($item,$mainCurr,$currCurrency);
$msrpCurrencied2 = $currencyHelper->convertUniquePrice($item,$mainCurr,$currCurrency);


if($msrpCurrencied == $item) {
$html .= '<span>' . $currencyHelper->format($item, $mainCurr) . '</span>';
} else {
$html .= '<span>' . $currencyHelper->format($msrpCurrencied, $currCurrency).' ('.$currencyHelper->format($item, $mainCurr).')' . '</span>';
}
if($msrpCurrencied2 == $item) {
$html .= '<span>' . $currencyHelper->format($item, $mainCurr) . '</span>';
} else {
$html .= '<span>' . $currencyHelper->format($msrpCurrencied, $currCurrency).' ('.$currencyHelper->format($item, $mainCurr).')' . '</span>';
}

if($config > 0) {
if(!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
include_once(rtrim(JPATH_ADMINISTRATOR,DS) . DS . 'components' . DS . 'com_hikashop' . DS . 'helpers' . DS . 'helper.php');
JHTML::_('behavior.framework');
$hs_config = hikashop_config();
$productClass = hikashop_get('class.product');
$_SESSION= $productClass->get($item);
$params = new JRegistry('');
// enable quantity field
if($config == 2) {
$params->set('show_quantity_field', 1);
} else {
$params->set('show_quantity_field', 0);
}
$params->set('price_with_tax',$hs_config->get('price_with_tax',1));
$params->set('add_to_cart',1);
$js = '';
$html .= hikashop_getLayout('product','add_to_cart_listing',$params,$js);
}

$html .= '</div>';

return $html;
}

function itemCart($name, $map, $ajax, $type){
$html = '<input type="'.$type.'" class="btn button hikashop_cart_input_button" name="'.$map.'" value="'.$name.'" onclick="'.$ajax.'"/>';
$html.='<input id="hikashop_product_quantity_field_1" type="hidden" value="1" class="hikashop_product_quantity_field" name="quantity" />';
return $html;
}

May you help me to understand how can I put the first code into NSPGK5 product view?

Thanks

File Attachment:

File Name: bitsofcode.zip
File Size:5 KB

Attachments:

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
8 years 7 months ago #254263

Hi,

That store function doesn't have the data of the product available in its variables. So it's not possible to add some code there to get the retail price and display it. It would require a least another modification where that function is used to pass on the product data so that the retail price could be used in the store function.
Again, I don't know how the module is done.
But why ask us and not the developers of the module ? They know their module better than anyone else and will be able to guide you better than us. Apart from the fact that it's not our job to support other's extensions...

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

Time to create page: 0.060 seconds
Powered by Kunena Forum