News:

Looking for documentation? Take a look on our wiki

Main Menu

Accessing product values from a product page

Started by ereallstaff, July 03, 2013, 12:09:39 PM

Previous topic - Next topic

ereallstaff

Hello!

I am on a virtuemart page product details.

Is it possible to access products parameters, without executing queries again?

I need f.e. product_weight , that should be inserted already inside globals variable ( but using $_GLOBAL['product']  doesn't give me back anything) .

Inside the view is it possible to make a $view->get ('product)  , but will be possible to have the current instance from external and get those?

Thanks

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ì
Try out our new joomla background rotator ( for joomla 1.x or 2.x), for only 14,99 eur @ innovailweb.it

Milbo

of course. all is there, learn to use vmdebug. enable virtuemart debug and use vmdebug('mydata',$this) in your layout to see which data is accessible.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

ereallstaff

Hello guys and thanks for replies

I try vmdebug soon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ì
Try out our new joomla background rotator ( for joomla 1.x or 2.x), for only 14,99 eur @ innovailweb.it

ereallstaff

I suppose that if the print is:

vmdebug mydata

means that $this is null?

Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ì
Try out our new joomla background rotator ( for joomla 1.x or 2.x), for only 14,99 eur @ innovailweb.it

Milbo

?, no

first parameter description, next parameters are the values to print. $this should be never null. $this in a layout should show you the whole accessible data.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/