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

Manufacturer's logos listed on front page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #22  
Old 08-01-2007, 02:09 PM
 
MBA MBA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 245
 

Default Re: Manufacturer's logos listed on front page

Got it. This works in 4.0.17 and 4.0.19

root>skin1>modules>Manufacturers>menu_manufacturer s.tpl

Remove or put <!-- --> around this:

<A href="manufacturers.php?manufacturerid={$manufactu rers_menu[mid].manufacturerid}" class=VertMenuItems>{$manufacturers_menu[mid].manufacturer}</A>

Replace with:

<a href="manufacturers.php?manufacturerid={$manufactu rers_menu[mid].manufacturerid}"><img src="mlogo.php?manufacturerid={$manufacturers_menu [mid].manufacturerid} " alt="{$products[product].manufacturer}" border="0" /></a>

You may have to play with the alt tag a bit. alt="{$manufacturer.manufacturer}" and alt="{$product.manufacturer}" may work in your situation.

I didn't have to touch the php file. Hope this helps someone and glad I could contrib to this thread. Thanks for starting it.
__________________
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
  #23  
Old 04-09-2008, 01:45 PM
 
tamicampos tamicampos is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 38
 

Default Re: Manufacturer's logos listed on front page

Hi Beetlejuice,

Thanks for that. By the way, I am a newbie and was wondering how you got the border around the whole site. I would like to do it but haven't been able to figure out how to tie the whole thing together. Thanks.
__________________
X-Cart 4.1.9
Reply With Quote
  #24  
Old 04-09-2008, 03:06 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Manufacturer's logos listed on front page

Quote:
Originally Posted by tamicampos
Hi Beetlejuice,

Thanks for that. By the way, I am a newbie and was wondering how you got the border around the whole site. I would like to do it but haven't been able to figure out how to tie the whole thing together. Thanks.

Hi tamicampos,

Simply by just adding cells etc around the existing templates, setting widths etc and a bit of photoshop work for the graphics.

As has been mentioned on these forums before, we all start off as newbies, so get hold of a copy of Dreamweaver if you don't have it already, use Webmaster mode as often as you can to see what templates are used and where, how, why etc and very quickly you'll start to see how XCart works. Open the home, header, footer templates etc in Dreamweaver and you quickly add extra tables, cells etc to help you in the design of your site. Oh and search Google for smarty template extensions for Dreamweaver and install those as well into Dreamweaver as they also help show the Smarty component of XCart which I'm still getting my head around.

But don't forget to search these forums regularly as they have been a huge source of information for me and will continue to be for as long as I run ecommerce sites. You won't get any better support than from within these walls.

Good luck
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #25  
Old 04-10-2008, 08:23 AM
 
tamicampos tamicampos is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 38
 

Default Re: Manufacturer's logos listed on front page

Thank you so much. That's what I have been trying to do. I have learned a lot and the community forum is invaluable!!!!

I have a question about the Dreamweaver translator. I started on Dreamweaver and then got turned on to x-cart so I am familiar with it. I loaded the translator into Dreamweaver but now I was wondering if I open a new file as a PHP document or stick with the HTML blank document. I have never worked with PHP in Dreamweaver. (I know smarty's are a little different). Also, did you copy all of your templates into the text editor or just do one template at a time?

Thanks again.
__________________
X-Cart 4.1.9
Reply With Quote
  #26  
Old 04-10-2008, 09:08 AM
 
tamicampos tamicampos is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 38
 

Default Re: Manufacturer's logos listed on front page

Also, I am getting an error message saying that the smarty translator did not load b/c it says "has configuration information that is invalid". I am not sure that I saved it properly as a .diff file (not sure how to do it). That might be the problem. Help!
__________________
X-Cart 4.1.9
Reply With Quote
  #27  
Old 04-10-2008, 01:51 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Manufacturer's logos listed on front page

Quote:
Originally Posted by tamicampos
Thank you so much. That's what I have been trying to do. I have learned a lot and the community forum is invaluable!!!!

I have a question about the Dreamweaver translator. I started on Dreamweaver and then got turned on to x-cart so I am familiar with it. I loaded the translator into Dreamweaver but now I was wondering if I open a new file as a PHP document or stick with the HTML blank document. I have never worked with PHP in Dreamweaver. (I know smarty's are a little different). Also, did you copy all of your templates into the text editor or just do one template at a time?

Thanks again.

The only plug-in I use is http://smartydwt.klitsche.org/ see attached file.

You need to create and edit .tpl files not php files to change the design of your store. These are all in your skin1 directory and sub directories. Example if you want to set a maximum width for your site you edit rectangle_top.tpl, mine is 950 pixels etc etc.

If you screw up don't worry, if the tpl file is still open in DW, the old Undo (Ctrl Z)is a godsend. Worst case scenario there's always the original tpl file in skin1_original that you can copy back into your skin1 directory.

I only work on individual tpl files, but that could be just me. Others may open up as many as they're comfortable with.

"Also, I am getting an error message saying that the smarty translator did not load b/c it says "has configuration information that is invalid". I am not sure that I saved it properly as a .diff file (not sure how to do it). That might be the problem. Help!"

Don't really know what translator you are using, the ones I know of are installed via the DW Extension Manager, there's no creating .diff files. See first line of reply.

Have fun
Attached Files
File Type: zip smartyDWT.zip (63.1 KB, 415 views)
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #28  
Old 04-20-2008, 02:35 PM
  peterstagg's Avatar 
peterstagg peterstagg is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 85
 

Default Re: Manufacturer's logos listed on front page

Hi Beetlejuice
Just like to add my thanks for this mod. It's just what I have been looking for and it works perfectly.
Cheers
Peter
__________________
Peter
"http://www.memoryoverload.com"

Reply With Quote
  #29  
Old 02-22-2009, 06:50 PM
  shopccp's Avatar 
shopccp shopccp is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Re: Manufacturer's logos listed on front page

Do you know how to implement this for 4.2?
__________________
X-Cart Gold v4.4.4
Apache v2.2.20
PHP v5.3.8
MySQL v5.1.56-log
Linux kernel v2.6.18-238.19.1.el5xen
Reply With Quote
  #30  
Old 02-22-2009, 06:53 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Manufacturer's logos listed on front page

Sorry shop, haven't even had a moments chance to even start playing with 4.2.
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 05:54 PM.

   

 
X-Cart forums © 2001-2020