- Posts: 299
- Thank you received: 2
Filter plugin display product price
11 years 1 month ago #212723
by LAMF
Filter plugin display product price was created by LAMF
-- url of the page with the problem -- :
www.bil-filtertjanst.se
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4.42
-- Browser(s) name and version -- : N/A
Hi,
I have a customized filter module and now in the end of the process I have a table to display all products after the filtering is done.
I have 4 columns displaying: Product name, description, Product price (incl. VAT), Thumbnail of product photo and ADD to Cart button (BUY/KÖP).
Everything except for the product price works fine.
How can I get that value listed as well?
Here is some code from the helper.php file that makes it all work.
This is the part where the table row displaying Product name and description, Product price incl. VAT, Thumbnail of product photo and Buy-button.
I get everything except dispolaying the price to work.
Anyone who can tell me how to call fror that value and make it correct?
Any help is highly appreciated.
Thanks
Micke
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4.42
-- Browser(s) name and version -- : N/A
Hi,
I have a customized filter module and now in the end of the process I have a table to display all products after the filtering is done.
I have 4 columns displaying: Product name, description, Product price (incl. VAT), Thumbnail of product photo and ADD to Cart button (BUY/KÖP).
Everything except for the product price works fine.
How can I get that value listed as well?
Here is some code from the helper.php file that makes it all work.
This is the part where the table row displaying Product name and description, Product price incl. VAT, Thumbnail of product photo and Buy-button.
Code:
<tr class="filter<?php echo $k?>">
<!--<td >Â </td>-->
<!--<td >Â </td>-->
<td style="padding: 6px; font-size: 14px;" width="170"><?php echo $product->product_name?></td>
<td style="padding: 6px; font-size: 14px;" width="80"><?php echo $product->product_price?></td>
<td >
<a title="Bilden är endast representativ för filtertypen" rel="shadowbox" href="images/com_hikashop/upload/<?php echo $image;?>">
<img width="50" border="0/" src="images/com_hikashop/upload/<?php echo $image;?>">
</a>
</td>
<td width="170" align="right" class="filter<?php echo $k?>" style="text-align: right;">
<input type="button" onclick="AddToCart<?php echo $moduleid?><?php echo $uniqid?>(this,'<?php echo $product->product_id;?>');return false;" value="<?php echo JText::_('ADD_TO_CART')?>" name="add" class="btn button hikashop_cart_input_button" rel="#filterresult<?php echo $moduleid?><?php echo $uniqid?>" method="Cart"/>
</td>
</tr>
Anyone who can tell me how to call fror that value and make it correct?
Any help is highly appreciated.
Thanks
Micke
Please Log in or Create an account to join the conversation.
11 years 1 month ago #212732
by nicolas
Replied by nicolas on topic Filter plugin display product price
Hi,
You first need to load the prices. You can't just use product_price when that variable doesn't exist.
you can do something like that:
You first need to load the prices. You can't just use product_price when that variable doesn't exist.
you can do something like that:
Code:
<?php $class = hikashop_get('class.currency');
$ids = array($product->product_id);
$class->getPrices($product, $ids, hikshop_getCurrency(), hikshop_getCurrency(), hikashop_getZone(), $product->product_tax_id);
echo $class->format($product->prices[0]->price_value_with_tax, hikashop_getCurrency());
?>
The following user(s) said Thank You: LAMF
Please Log in or Create an account to join the conversation.
11 years 1 month ago #212790
by LAMF
Replied by LAMF on topic Filter plugin display product price
Hi,
Excellent,now it works exactly as i want it.
Thanks a lot.
Best regards
Micke
Excellent,now it works exactly as i want it.
Thanks a lot.
Best regards
Micke
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds