Author Topic: CurrencyDisplay Outside VirtueMart  (Read 363 times)

QQ

  • Beginner
  • *
  • Posts: 10
  • A beginner
CurrencyDisplay Outside VirtueMart
« on: August 25, 2017, 23:23:04 pm »
I need to get Rows calculations outside VirtueMart. It can be done by:

Code: [Select]
shopFunctionsF::calculateProductRowsHeights($products,$currency,$products_per_row);
I got $products, $products_per_row but don't know how to get $currency. If I print out $currency at templates/My template/html/com_virtuemart/sublayouts/products.php I get CurrencyDisplay Object.

And class CurrencyDisplay can't be reached from outside. Any ideas what to send instead CurrencyDisplay Object. Or how to get it outside?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9412
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: CurrencyDisplay Outside VirtueMart
« Reply #1 on: August 26, 2017, 08:45:01 am »
the function calculateProductRowsHeights calculates the HEIGHT! of a row. It has nothing todo with prices
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

QQ

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: CurrencyDisplay Outside VirtueMart
« Reply #2 on: August 26, 2017, 11:49:57 am »
the function calculateProductRowsHeights calculates the HEIGHT! of a row. It has nothing todo with prices
I didn't talk about price.  :)
I was saying "I need to get Rows calculations outside VirtueMart."
to get that I need $currency->_priceConfig

Code: [Select]
$priceRows = 0;
//Lets calculate the height of the prices
foreach($currency->_priceConfig as $name=>$values){
if(!empty($currency->_priceConfig[$name][0])){
       if(!empty($product->prices[$name]) or $name == 'billTotal' or $name == 'billTaxAmount'){
              $priceRows++;
}
}
}

and later I will need it at this function:
Code: [Select]
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$product,'currency'=>$currency)); ?>
That's the only think left that I don't have.
Everything is set by CurrencyDisplay class that I can't reach from outside.

QQ

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: CurrencyDisplay Outside VirtueMart
« Reply #3 on: August 26, 2017, 16:44:26 pm »
I quit the idea to get joomla search view same as virtuemart products.
I will import joomla search into virtuemart. Not what I wanted but faster with skills I have at the moment.

Just explain why You guys left advanced search  so unfinished?..
While everything else in virtuemart feels  finished till last touch.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26417
  • Always on vacation
    • Jenkin Hill Internet
Re: CurrencyDisplay Outside VirtueMart
« Reply #4 on: August 26, 2017, 17:06:25 pm »
There are many different user search methods that VM users like to use, and you no one method cam match everybodies needs. So there is a range of plugins to provide those requirements, eg http://extensions.virtuemart.net/product/products/ajax-search-pro-detail  or  http://extensions.virtuemart.net/product/products/ebay-instant-keyword-search-detail
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.8 on Joomla 3.8.2 PHP 7.0.25

Testing VM3.2.8 on J3.8.3RC

QQ

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: CurrencyDisplay Outside VirtueMart
« Reply #5 on: August 26, 2017, 17:19:15 pm »
I am not talking about fit all needs.
Basic advanced search I think is more or less enough, like joomla offer now. Just view of a products like in category. 
I would come and help You do this, but I got basic understanding about classes and joomla it self :)   

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9412
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: CurrencyDisplay Outside VirtueMart
« Reply #6 on: August 27, 2017, 15:43:47 pm »
First:

The function shopFunctionsF::calculateProductRowsHeights calculates Heights! It does not display a product or calculate prices. It is a template thing.

There are two searches. One is part of the category view and there is also a search module for it and we have a plugin, which is a bit outdated. But it works.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/