Page 1 of 1

Place variable in product description... is it possible?

Posted: Sat Nov 04, 2017 6:33 am
by print-n-tees
Greetings everyone. Hope you all have a great weekend.

Im curious... is it possible to add a product variable such as the model number into the description?

I tried with the twig tag: {{ model }} but because the description is outside of the twig template the information is not being processed... so it shows up as {{ model }} in the description and not the actual model number.

Thank you in advance.

Angelina

Re: Place variable in product description... is it possible?

Posted: Sat Nov 04, 2017 7:08 am
by yodapt
No that's not possible like that. You could pull off something similar by altering the product controller though. Install the VQMod file in attachment, and you'll be able to use {{model}} inside the description.

Re: Place variable in product description... is it possible?

Posted: Sat Nov 04, 2017 11:43 am
by print-n-tees
Im using opencart 3.0.2.0 I dont have vqmod installed. Will I need to in order to use this? Or how do I use it??

Thank you!!!!

Angelina

Re: Place variable in product description... is it possible?

Posted: Sat Nov 04, 2017 11:44 am
by print-n-tees
I thought there may be a way to do it with PHP?

Re: Place variable in product description... is it possible?

Posted: Sat Nov 04, 2017 11:51 am
by print-n-tees
Ahhh figured it out. Thank you!!!!! It works!!!!

Thank you for being sooooo helpful!!

They should have a rating system for you guys. Some of you guys are so helpful and very knowledgeable.

I really appreciate it.

Re: Place variable in product description... is it possible?

Posted: Sat Nov 04, 2017 10:40 pm
by straightlight
print-n-tees wrote:
Sat Nov 04, 2017 11:44 am
I thought there may be a way to do it with PHP?
Not suggested since Opencart uses upgrades which require all core files to be replaced as it also makes changes to the database. As for VQMod, it is free and it can be downloaded at: http://www.vqmod.com (Opencart edition).

Re: Place variable in product description... is it possible?

Posted: Wed Nov 08, 2017 5:34 am
by print-n-tees
i had vqmod on my 1.5.6 install... but I thought opencart 3 did not use vqmod. I dont see a lot of addons or extensions for opencart 3 using it.

Re: Place variable in product description... is it possible?

Posted: Wed Nov 08, 2017 5:44 am
by straightlight
VQMod can be used for all versions of Opencart. There are typically no exceptions.