X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Manufacturer's logos listed on front page (https://forum.x-cart.com/showthread.php?t=30624)

MBA 07-31-2007 08:45 PM

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!!!:D

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);

?>
=================================================

MBA 08-01-2007 02:09 PM

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.

tamicampos 04-09-2008 01:45 PM

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.

beetlejuice 04-09-2008 03:06 PM

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

tamicampos 04-10-2008 08:23 AM

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.

tamicampos 04-10-2008 09:08 AM

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!

beetlejuice 04-10-2008 01:51 PM

Re: Manufacturer's logos listed on front page
 
1 Attachment(s)
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

peterstagg 04-20-2008 02:35 PM

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

shopccp 02-22-2009 06:50 PM

Re: Manufacturer's logos listed on front page
 
Do you know how to implement this for 4.2?

beetlejuice 02-22-2009 06:53 PM

Re: Manufacturer's logos listed on front page
 
Sorry shop, haven't even had a moments chance to even start playing with 4.2.


All times are GMT -8. The time now is 07:14 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.