View Single Post
  #21  
Old 07-31-2007, 08:45 PM
 
MBA MBA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 245
 

Default Re: Manufacturer's logos listed on front page

Quote:
Originally Posted by beetlejuice
I'm not sure if anyone else will find this appealing but it suited me and my site.

XCart were able to help me with this, and as this forum has helped me tremendously, I'd like to give a little back to it.

Basically what I wanted to do was have my suppliers logos in place of the text links in the manufacturer's menu, not the manufacturer's page as other threads have established. If there was no logo then the standard text link would appear. Looks much better if it's either one or the other though. Mixed images and text yech!!!

Anyhow here it is:

Attachment 329 (IMPORTANT!! Rename the .txt to .diff)

You can see the result here.

Hope this mod helps others looking for this type of mod.

Any problems let me know, however this was written exclusively for XCart 4.16, but should work on all the 4.1 series, but can't guarantee it.

beetlejuice


OK, I've searched the forum to see if anyone sorted this for 4.0.19 and didn't find any thread. So I've been cracking at this most of the day and I have had zero luck getting this to work. NOTE: I'm trying to flunk it out using v4.0.19 Pro.

Here is our customer_manufacturers.php file below. It's fairly close to the structure of v4.1.7. You can see the common func_query, FROM, USE INDEX, WHERE, ORDER BY, and LIMIT. I have plugged little snips of your code here and there seeing what the result was and nothing but sql error. The menu_manufacturers.tpl file is the same with no difference. If anyone would take a stable at this to dumb down the code for 4.0.19 that would be nice.
================================================
#
# $Id: customer_manufacturers.php,v 1.3.2.5 2006/01/16 14:58:36 mclap Exp $
#

if ( !defined('XCART_START') ) { header("Location: ../"); die("Access denied"); }

$manufacturers_menu = func_query("SELECT * FROM $sql_tbl[manufacturers] USE INDEX (avail) WHERE avail = 'Y' ORDER BY RAND() LIMIT ".($config['Modules']['manufacturers_limit'] ));

$smarty->assign("show_other_manufacturers", (func_query_first_cell("SELECT COUNT(*) FROM $sql_tbl[manufacturers] WHERE avail = 'Y'") > $config["Modules"]["manufacturers_limit"]));
$smarty->assign("manufacturers_menu", $manufacturers_menu);

?>
=================================================
__________________
xCart Pro Version 4.0.17, 4.0.19, 4.1.8, 4.1.10, 4.1.11, 4.1.12 - retired
xCart Pro Version 4.3.1 - production
xCart Pro Version 4.5.1 - testing
RHEL Platform
Reply With Quote