| ||||||||||
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 |
#41
|
|||||||||
|
|||||||||
Someone came to me unable to get this code to work on their site and I wasn't able to fix it either so I created another way to do this.
To show the manufacturer on a per product basis on products.php you can also do this instead: In products.php before: Code:
Insert: Code:
In skin1/customer/main/products_t.tpl or skin1/customer/main/products.tpl insert the following where you want the manufacturer to show up Code:
Hope that helps those who are stuck! A bit less code and less files to edit. Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#42
|
|||||||
|
|||||||
Hi Carrie
Just followed this thread through, and the main suggestions definitely don't work for me either (incorrect manufacturers, links to wrong manufacturers etc.) but your mod does work ... but only in certain situations: products.tpl works fine when called from home.php?cat=x but not when called from search.php?mode=search Can't get the code to work at all in products_t.tpl Any suggestions? Also, what would be the code to turn the Manufacturer name into an url? The code posted earlier in the thread is obviously relating to the original functions. On a general point, anyone know why Carrie's variation is needed for some projects and not others? Many thanks, FN
__________________
www.smartchoicemusic.com Smart Choice Music - Import CD and DVD Specialists 4.6.0 MySQL 5.5.34 PHP 5.4.24 Apache/2.2.26 Multiple homegrown and paid-for mods |
|||||||
#43
|
|||||||||
|
|||||||||
FN,
I'm not surprised it doesn't work for search.php You would need to add similar code to search.php If I get a chance, I will look into it and post the code here. Also, this does work for product_t.tpl as that's what I used it on when writing the code, however, if you're talking about in the featured products section, then php code may need to be added to featured_products.php file I'd have to look at the code flow to be sure, but I believe that is the case. Hope this helps some and if I get a chance I'll look into your questions more and post findings. Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#44
|
|||||||
|
|||||||
Thanks for that Carrie - This facility on Search results would make a big difference to my project.
Regarding product_t.tpl my only dealing with this so far is in Featured Products - I don't know what other features use this template?? I dug around in the forum after you said this, and this thread has provided the code for Manufacturer to appear in Featured Products: http://forum.x-cart.com/viewtopic.php?t=19684 I'll take a look now and see if I can use it in Search Results This subject seems to be turning up in lots of guises in different parts of the forum - It might be useful if someone with more knowledge than I have rounds up all of this useful information at some stage??
__________________
www.smartchoicemusic.com Smart Choice Music - Import CD and DVD Specialists 4.6.0 MySQL 5.5.34 PHP 5.4.24 Apache/2.2.26 Multiple homegrown and paid-for mods |
|||||||
#45
|
|||||||
|
|||||||
It looks like a combination of code snippets from Carrie's solution, the main solution in this thread and the one in the thread I referred to in my last post has done the trick.
It seems as though the php code in http://forum.x-cart.com/viewtopic.php?t=19684 has generated the correct results for the template changes suggested by Carrie. I now have Manufacturers appearing in products.tpl and product_t.tpl whether viewing by categories or by seach results, and also in Featured Products. The code to have Manufacturers appear in product.tpl as suggested in this post also works a treat. Good news all round - sincere thanks to all the forumistas who have contributed to this one!! FN
__________________
www.smartchoicemusic.com Smart Choice Music - Import CD and DVD Specialists 4.6.0 MySQL 5.5.34 PHP 5.4.24 Apache/2.2.26 Multiple homegrown and paid-for mods |
|||||||
#46
|
|||||||||
|
|||||||||
Glad you got it figured out.
products_t.tpl can be used on the normal products.php pages if you have in the admin set for products to be showin in multi column format. Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#47
|
|||||||
|
|||||||
A-ha ... so that's where that template shows up. Useful information and something to bear in mind when I'm tinkering with it.
Much appreciated! FN.
__________________
www.smartchoicemusic.com Smart Choice Music - Import CD and DVD Specialists 4.6.0 MySQL 5.5.34 PHP 5.4.24 Apache/2.2.26 Multiple homegrown and paid-for mods |
|||||||
#48
|
|||||||||
|
|||||||||
This also works like a charm for the search (thanks everyone who's posted) - this is an extension of Carrie's solution
in include/search.php just before: Code:
include: Code:
To get the manufacturer's name to hyperlink, simply use: Code:
instead of: Code:
where you would like it to show up in skin1/customer/main/products_t.tpl or skin1/customer/main/products.tpl
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#49
|
|||||||
|
|||||||
Re: get manufacture in products.php
Quote:
no work in 4.1.x how can fix?
__________________
Gonzalo Astudillo Pizarro | https://about.me/gonzaloastudillo |
|||||||
#50
|
|||||||
|
|||||||
Re: get manufacture in products.php
It did work for us. Thanks!
Also, added the code in featured_products.php (same as in products.php) - so it works on the featured products list as well. |
|||||||
|
|||
X-Cart forums © 2001-2020
|