Author Topic: Display Product Attribute in Frontend  (Read 950 times)


  • Beginner
  • *
  • Posts: 1
Display Product Attribute in Frontend
« on: May 12, 2014, 13:10:27 pm »

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.

Joomla 2.5
Virtuemart 2.0

Thanks in advance


  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27799
  • Always on vacation
    • Jenkin Hill Internet

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 VM on Joomla 3.9.19 PHP 7.3.18

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9748
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Display Product Attribute in Frontend
« Reply #2 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

GJC Web Design
VirtueMart and Joomla Developers - php developers
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
Contact for any VirtueMart or Joomla development & customisation