Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Proper way for query functionality
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #21  
Old 04-19-2017, 01:17 PM
  PhilJ's Avatar 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Location: UK
Posts: 3,601
 

Default Re: Proper way for query functionality

If all you are looking to do is display manufacturer icons on the manufacturer list page...

In modules/Manufacturers/customer_manufacturers_list.php

Before...
Code:
$smarty->assign('manufacturers', $manufacturers);
Insert...
Code:
if ($manufacturers) { foreach($manufacturers as $key=> $manufacturer) $manufacturers[$key]["image_path"] = func_query_first_cell("SELECT image_path FROM $sql_tbl[images_M] WHERE id=".$manufacturer["manufacturerid"]); foreach($manufacturers as $key=> $manufacturer) $manufacturers[$key]["image_x"] = func_query_first_cell("SELECT image_x FROM $sql_tbl[images_M] WHERE id=".$manufacturer["manufacturerid"]); foreach($manufacturers as $key=> $manufacturer) $manufacturers[$key]["image_y"] = func_query_first_cell("SELECT image_y FROM $sql_tbl[images_M] WHERE id=".$manufacturer["manufacturerid"]); }
Then in skin/common_files/modules/Manufacturers/customer_manufacturers_list.tpl

In the foreach loop...
Code:
<img src="{$m.image_path|amp}" width="{$m.image_x}" height="{$m.image_y}" alt="{$m.manufacturer|escape}>
Reply With Quote

The following user thanks PhilJ for this useful post:
qualiteam (04-19-2017)
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:23 AM.

   

 
X-Cart forums © 2001-2018