| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
get manufacture in products.php | ||||
|
|
Thread Tools | Search this Thread |
#31
|
|||||||||
|
|||||||||
Ok I got it:
instead of Quote:
It should be: Quote:
__________________
"The point is, to make so much money, that money isn't the point anymore." Pro Version 4.0.19 Gold Version 4.1.3 Linux |
|||||||||
#32
|
|||||||
|
|||||||
Manfacturer Name and Link in Products List
I am trying to get the manfucturer name to display on the products listing page. I have done the following:
========================================== Make a new function in func.php Code: function func_get_manufacturers($manufacturerid) { global $sql_tbl; return func_query("SELECT $sql_tbl[manufacturers].* FROM $sql_tbl[manufacturers] WHERE manufacturerid='$manufacturerid'"); } In products.php Code: if ($products) { foreach ($products as $k => $v) $manufacturers[] = func_get_manufacturers($v["manufacturerid"]); } $smarty->assign("manufacturers", $manufacturers); In products.tpl just use Code: {*** ########## Lines below to display manufacture name ########## ***} {assign var="manid" value=$products[product].manufacturerid} {if $manufacturers[$manid].manufacturerid ne "0"} <FONT class="ItemsList">{$manufacturers[$manid].manufacturer}</FONT> {/if} {*** ########## End display manufacture name ########## ***} ========================================== The problem I am having is the the link shows the incorrect manufacturer name, but when I click on the link it takes me to the correct manufacturer page. Thanks David X-Cart version 4.0.12 PHP 4.3.10 MySQL server 4.0.23-nt-max MySQL client 3.23.49 Web server Microsoft-IIS/6.0 Operation system Windows XML parser (expat) 1.95.6 |
|||||||
#33
|
|||||||||
|
|||||||||
This is the way it works for me:
In product.php before the smarty assigns Quote:
In product.tpl you have to play different positions that you'll like to see it display You can use this one: Quote:
or you can use yours. Forget about the func.php
__________________
"The point is, to make so much money, that money isn't the point anymore." Pro Version 4.0.19 Gold Version 4.1.3 Linux |
|||||||||
#34
|
|||||||
|
|||||||
Hello
I've been working my way through this thread and managed to get the manufacturer displaying items on the product page (product.tpl) and the product list (products.tpl) - thanks very much to pmstudios and jds580s for that. You've helped me get my head round xcart quite a bit with your posts. However, I can only get the manufacturer to display per product. In fact I want to display all the products for a manufacturer. I think this might need to be done in products_t.tpl but I can't really work out what's going on in there. In fact I really want the manufacturer to be a subcategory but that doesn't seem to be an option. Any help with this would be greatly appreciated. Davros |
|||||||
#35
|
|||||||||
|
|||||||||
You mean:
http://www.your-domain.com/manufacturers.php
__________________
"The point is, to make so much money, that money isn't the point anymore." Pro Version 4.0.19 Gold Version 4.1.3 Linux |
|||||||||
#36
|
|||||||
|
|||||||
No - manufacturers.php just gives a list of _all_ manufacturers. I want to list the items by manufacturer for each category.
So when I go to home.php?cat=1 I want Category 1 Manufacturer 1 item 1 item 3 Manufacturer 2 item 2 item 4 item 5 etc At the moment I get Category 1 item 1 - manufacturer 1 item 2 - manufacturer 2 item 3 - manufacturer 1 item 4 - manufacturer 2 item 5 - manufacturer 2 Does that make sense? |
|||||||
#37
|
|||||||||
|
|||||||||
You can do that manually, you create the category, your subcategories will be the name of the manufacturers or brands, and then you assign the products to each one, also you can put a logo to each of the subcategories(brands). Also you can use one of the mod's that handle subcategories for your products presentation.
Hope this help.
__________________
"The point is, to make so much money, that money isn't the point anymore." Pro Version 4.0.19 Gold Version 4.1.3 Linux |
|||||||||
#38
|
|||||||||
|
|||||||||
Re: Manfacturer Name and Link in Products List
Quote:
Just a summary of things we did to show manufacturer name in the list of products (thanks to pmstudios and jds580s) add to include/func.php Code:
in products.php before this line: Code:
add Code:
in customer/main/products.tpl or customer/main/products_t.tpl: after Code:
add Code:
Example is here: http://www.reach4life.com/store/home.php?cat=554 |
|||||||||
#39
|
|||||||||
|
|||||||||
Hey 27stars, I'm glad that you convinced them to change to x-cart. I used to have their old shopping cart too.
__________________
"The point is, to make so much money, that money isn't the point anymore." Pro Version 4.0.19 Gold Version 4.1.3 Linux |
|||||||||
#40
|
|||||||
|
|||||||
I cannot get this code to work for me. I have followed all the different variations that many of you have placed in this thread, but can't any of them to work.
Here is my thread, any help would be appreciated! http://forum.x-cart.com/viewtopic.php?t=20524 Brian
__________________
X-Cart Gold v4.0.18 [unix] - Easy Checkout module - ezUpsell module - CDSEO module X-Cart Gold v4.1.11 [unix] ***38,000+ active products! - CDSEO module - Address Book module - Reorder module - Smart Search module X-Cart Gold v4.4.2 [unix] - in development now! |
|||||||
|
|||
X-Cart forums © 2001-2020
|