Display price blackend

  • Posts: 25
  • Thank you received: 0
11 years 1 month ago #164542

-- HikaShop version business
-- Joomla version -- : 3.2
I need to customize the display of the blackend displaying the price with tax. how can I?
Thanks!

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

  • Posts: 84301
  • Thank you received: 13698
  • MODERATOR
11 years 1 month ago #164563

Hi,

On which product price of which page of the backend do you want to do that ?
Could you give a screenshot maybe ?

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

  • Posts: 25
  • Thank you received: 0
11 years 1 month ago #164623

I would like to see two columns: price without VAT and price with VAT
Thanks!

Attachments:

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

  • Posts: 84301
  • Thank you received: 13698
  • MODERATOR
11 years 1 month ago #164697

Hi,

To display the prices with tax on that listing, edit the file "listing" of the view "product" for your backend template via the menu Display>views and change the line:
<?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>
to:
<?php echo $this->currencyHelper->displayPrices(@$row->prices,'price_value_with_tax'); ?>

and if you want both prices, simply use both lines of code and rearrange the HTML of the table to suits your needs.

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

  • Posts: 25
  • Thank you received: 0
11 years 1 month ago #164740

Thanks for the reply, but it does not work there is something wrong ... I am attaching the screenshot

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #164816

Hi,

The values of the price with tax are indeed not loaded.
Thanks to edit the file "administrator/components/com_hikashop/views/product/view.html.php" and replace the function "_loadPrices()" by:

	function _loadPrices(&$rows){
		$currencyClass = hikashop_get('class.currency');
		$zone_id = hikashop_getZone();
		$ids = array();
		foreach($rows as $row){
			$ids[]=(int)$row->product_id;
		}
		$query = 'SELECT * FROM '.hikashop_table('price').' WHERE price_product_id IN ('.implode(',',$ids).')';
		$database = JFactory::getDBO();
		$database->setQuery($query);
		$prices = $database->loadObjectList();
		if(!empty($prices)){
			foreach($rows as $k => $row){
				foreach($prices as $price){
					if($price->price_product_id==$row->product_id){
						if(!isset($row->prices)) $row->prices=array();
						$rows[$k]->prices[$price->price_min_quantity]=$price;
						$rows[$k]->prices[$price->price_min_quantity]->price_value_with_tax = $currencyClass->getTaxedPrice($price->price_value,$zone_id,$row->product_tax_id);

					}
				}
			}
		}
	}

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

  • Posts: 25
  • Thank you received: 0
11 years 1 month ago #164902

Thanks!!! is ok!!!

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

  • Posts: 154
  • Thank you received: 4
10 years 10 months ago #175572

so xaviers-fix has not been incorporated to the latesst update 2.3.3?
do we need to keep track of this change or will this be part of the next update?

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

  • Posts: 84301
  • Thank you received: 13698
  • MODERATOR
10 years 10 months ago #175573

The modification will be added in HikaShop 2.3.4
HikaShop 2.3.3 was just a security release with no new features, improvment or fix.

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

  • Posts: 86
  • Thank you received: 9
10 years 10 months ago #175639

When will 2.3.4 be released ?
Is there a roadmap with what will be added in the future of hikashop ?


Kind regards,
Cornel

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

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #175649

Hi,

The 2.3.4 should be released during this month, there is no roadmap, but once released you will see the changelog:
hikashop.com/support/support/documentati...ashop-changelog.html

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

Time to create page: 0.103 seconds
Powered by Kunena Forum