Post by ahmedatwa » Sat May 07, 2016 5:48 am

Hi Guys,

i have new table called vendors, and i need to Join that table with the below function, to echo vendors name in product_list.tpl file

in Admin/Model/Product.php

Code: Select all

public function getProducts($data = array()) {
		$sql = "SELECT * FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "'";
i can only echo vendors_id from product table which reads id from vendors table, however i need to echo vendor_name in vendors table.

How to achieve that

New member

Posts

Joined
Sat Mar 05, 2016 5:22 pm
Who is online

Users browsing this forum: No registered users and 11 guests