| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Manufacturer on Product List / Recommended | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Manufacturer on Product List / Recommended
I searched through all of the previous topics mentioning this, but none of the solutions seem to have worked for me; I tried adding the following function to product.php:
Code:
(without commenting them out of course), which all seemed pretty straightforward, but didn't seem to work. Also tried (again in product.php): Code:
which again, the logic behind it seems pretty straightforward to me, but didn't work. For reference, here is the code I'm using on the products_t.tpl: Code:
Webmaster mode even shows manufacturer as a variable under the product arrays, but I just can't seem to access it. Any help appreciated before I slam my head against the wall!
__________________
Version 4.4.4 Gold |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Manufacturer on Product List / Recommended
Check out the end of this thread. It looks like the same code but the smarty code they used to call the manufacturer was different. 7thdesire said this allowed him to see the manufacturer name on the products list.
Try changing (in your template products_t.tpl): PHP Code:
To this: PHP Code:
Edit: I forgot if you are using columns for your products list you want to edit products_t.tpl, if not edit product_list.tpl
__________________
X-Cart Pro v4.2.2 [Win] X-Cart Pro v4.2.3 [Win] X-Cart Pro v4.4.4 [Win] |
|||||||||
#3
|
|||||||
|
|||||||
Re: Manufacturer on Product List / Recommended
Quote:
Thanks for the idea - one of the codes I was testing in the OP was modified from 7thdesire's. I just plugged in the original again to see if it worked, and tried a few different arrangements for the variable on products_t and none of them appear to display anything: {$manufacturer.manufacturer} {$product.manufacturer} {$manufacturer.manufacturer}{$product.manufacturer } - this one works on the individual product pages, at least! The <div class="brand"></div>s are showing up though, so at least I'm fairly certain that I'm using the correct .tpl file
__________________
Version 4.4.4 Gold |
|||||||
|
#4
|
|||||||||
|
|||||||||
Re: Manufacturer on Product List / Recommended
Ok I almost slammed my head into a wall too trying to figure this one out. Okay so here's the solution for X-Cart 4.4.4.
FORGET ABOUT PRODUCT.PHP!!! All the other posts are saying to add to that file and it doesn't do anything. Edit: /products.php <---- That's products.... with a 'S' on the end Find this at the bottom of the file: PHP Code:
Add this magical rare code above that line: PHP Code:
Now edit: /skin/your_skin/customer/main/products_list.tpl (if you are using single column) /skin/your_skin/customer/main/products_t.tpl (if you are using multi column) Add this code where you want the manufacturer name to appear: PHP Code:
That makes it work on the regular category pages. But if you want it to appear on the search pages read on. Edit: /search.php Find this line all the way at the bottom: PHP Code:
Add this code above: PHP Code:
And that's all. This mod is free!
__________________
X-Cart Pro v4.2.2 [Win] X-Cart Pro v4.2.3 [Win] X-Cart Pro v4.4.4 [Win] |
|||||||||
#5
|
|||||||
|
|||||||
Re: Manufacturer on Product List / Recommended
It worked perfectly on both counts! Thank you so much.
__________________
Version 4.4.4 Gold |
|||||||
#6
|
|||||||
|
|||||||
Re: Manufacturer on Product List / Recommended
Could this be turned into array and display manufacturers on category page?
display only manufacturers that exist in products belonging to category you are viewing Thanks.
__________________
x-cart 4.4.2 Gold |
|||||||
#7
|
|||||||
|
|||||||
Re: Manufacturer on Product List / Recommended
XCart4Life--thanks so much for your solution. I was able to get this to work on the homepage of my site, but for some reason, it doesn't work on category or manufacturer product listing pages. Any idea why that might be?
__________________
4.5.3 |
|||||||
#8
|
|||||||
|
|||||||
Re: Manufacturer on Product List / Recommended
Thanks XCart4Life
I confirm that your code works for 4.5.4 gold+ also Now, I just need some help to display for featured products on home page....do you have any idea ?
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#9
|
|||||||
|
|||||||
Re: Manufacturer on Product List / Recommended
Ok I managed to show it for featured products also
Open featured_products.php Find this at the bottom of the file: PHP Code:
Add this code above that line: PHP Code:
Done...Now it should display on featured products also on home page
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Manufacturer on Product List / Recommended
I recommend doing a single query rather than a separate query for each product. For example (untested):
PHP Code:
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|