Hi ya,
Ok I have searched the forum and thought I had come close a few times but to no avail. I need to retrieve data from a table and use it on the product display page. Namely I want to query Q's shipping group module table and if shipping_group_id = 3 then don't display the add to cart button.
My question is how and where do I put this query to be able to use that data on the product page.
Does this make sense, hope someone can help it's probably quite simple I'm just not that great at php yet.
Regards
Mick
Without having the modules myself I couldn't give you the exact code you need, but you need to edit this file: catalog\view\theme\default\template\product\product.tpl (around line 95)
I also recommend reading this to give you a base for building the code that you'll need.
http://forum.opencart.com/viewtopic.php ... 55&start=0
I also recommend reading this to give you a base for building the code that you'll need.
http://forum.opencart.com/viewtopic.php ... 55&start=0
I don't have that module installed but to query another table in the database you can use That way you will be able to place any data of the result on to the product page or wherever you want.
Remember that to access a variable like $var on the template files it has to be declared as $this->data['var'] on the controller!!
Code: Select all
$this->db->query("QUERY HERE");
Remember that to access a variable like $var on the template files it has to be declared as $this->data['var'] on the controller!!
Who is online
Users browsing this forum: No registered users and 32 guests