VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: AarthyV on May 12, 2014, 13:10:27 PM

Title: Display Product Attribute in Frontend
Post by: AarthyV on May 12, 2014, 13:10:27 PM
Hi,

I want to retrieve the value of product_attribute from virtuemart_order_items table and want to display in the same order as shown in checkout page.

I am using customer text input plugin in Vm2 for each product so that the user can type their comment for that product.

For example,
Comment: good
Saved in the database as {"134":{"textinput":{"comment":"good"}}

So how to retrieve "good" from the database.

Using:
Joomla 2.5
Virtuemart 2.0


Thanks in advance
AarthyV
Title: Re: Display Product Attribute in Frontend
Post by: jenkinhill on May 12, 2014, 13:23:29 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Display Product Attribute in Frontend
Post by: GJC Web Design on May 12, 2014, 13:28:14 PM
you don't say what column this is saved to  - but you access that in your template as any other node
It is in json format so you need to   php  json_decode($your_var) which will give you an object

also the example you give is syntax incorrect - missing a closing brace

{"134":{"textinput":{"comment":"good"}}}