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

More Effective Manufacturer view on Product Detail Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 04-20-2009, 12:39 AM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default Re: More Effective Manufacturer view on Product Detail Page

Quote:
Originally Posted by micromedia
This is more effective manufatucrer modul for product detail page. It is working on x-cart gold 4.1.6

manufacturer image,
manufacturer name,
link on this manufacturer page,

random 5 products from manufacturer with image, price, name


Create
modules/Manufacturers/manufacturerinfo.php

Code:
<? if ( !defined('XCART_SESSION_START') ) { header("Location: ../../"); die("Access denied"); } $query = "SELECT $sql_tbl[products].productid, $sql_tbl[products].product, $sql_tbl[products].descr, $sql_tbl[pricing].price FROM $sql_tbl[products],$sql_tbl[pricing] WHERE $sql_tbl[products].forsale='Y' AND $sql_tbl[products].avail > 0 AND $sql_tbl[products].productid = $sql_tbl[pricing].productid AND $sql_tbl[products].manufacturerid = '$product_info[manufacturerid]' ORDER BY RAND() LIMIT 5" ; $manufacturerinfos = func_query($query); $smarty->assign("manufacturerinfos",$manufacturerinfos); ?>



Create
modules/Manufacturers/manufacturerinfo.tpl


Code:
{* $Id: manufacturerinfo.tpl,v 1.8.2.1 2007/03/19 13:12:29 max Exp $ *} {if $product.manufacturer ne ""} {if $manufacturerinfos} {capture name=dialog } <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="left" style="padding:5px;" valign="top"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td> <td align="left" style="padding:5px;" valign="top" width="100%"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><b>{$product.manufacturer}</b></a><br /> {$product.manudescr|truncate:250:"...":true} <br /> <br /> <a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><u>See All Products</u></a></td> </tr> </table> <hr/> <table width="100%" cellpadding="0" cellspacing="0"> <tr > {foreach from=$manufacturerinfos item=manufacturerinfo } <td width="20%" valign="top"><div style="border:1px solid #ccc;padding:5px;margin:5px; text-align:center"> <a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> <font class="ProductTitle">{$manufacturerinfo.product}</font></a><br /> <a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> {include file="product_thumbnail.tpl" image_x=75 productid=$manufacturerinfo.productid product=$manufacturerinfo.product} </a><br /> <font class="ProductPrice"> Our Price:&nbsp; {include file="currency.tpl" value=$manufacturerinfo.price}</font><br /> {if $manufacturerinfo.list_price gt 0} <font class="MarketPrice"> Market Price:&nbsp;<s>{include file="currency.tpl" value=$manufacturerinfo.list_price}</s> </font> <br /> {/if} <font size="1"> {$manufacturerinfo.descr|truncate:50:"...":true}</font><br /> </div></td> {/foreach} </tr> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'} {/if} {/if}



EDIT product.php

After:
Code:
if ($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";


Add
Code:
if ($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/manufacturerinfo.php";


EDIT skin1/customer/main/product.tpl

Add

Code:
{include file="modules/Manufacturers/manufacturerinfo.tpl" }

This is such an excellent mod - works perfectly in 4.1.11 - great work!
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #42  
Old 10-25-2009, 08:39 AM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default Re: More Effective Manufacturer view on Product Detail Page

definately works in 4.1.12... Great mod, thanks again OP
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #43  
Old 11-06-2009, 04:46 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: More Effective Manufacturer view on Product Detail Page

Works fine in 4.2.3.

I am having a little problem with the formatting though. If the product title length varies from product to product it throws the "boxes" and the images off, making the "boxes" different sizes, and the images are not aligned, all depending on whether the product title is 1 line, 2 lines, or 3 lines. Any ideas?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #44  
Old 11-06-2009, 06:21 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: More Effective Manufacturer view on Product Detail Page

I have noticed one "issue". I'm using the clean URLs from x-cart and the product url is appended with ".html?manufacturerinfo=" instead of just ".html". Is this going to make any difference with SEO?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #45  
Old 11-18-2009, 05:52 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: More Effective Manufacturer view on Product Detail Page

I "fixed" the clean URL issue. I just removed the highlighted text from the code in manufacturerinfo.tpl
Code:
<a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo">
so that it is
Code:
<a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}">

There are 2 instances of it. I removed them and the URLs are clean now.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #46  
Old 11-19-2009, 10:09 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: More Effective Manufacturer view on Product Detail Page

This module working for me till now but as soon as I replaced the products with new description (through csv file upload)it stopped showing the "random 5 products from manufacturer with image, price, name" in the product detail page!!!

I double checked that manufacturers has been alloted to each product correctly & I can browse the products through manufacturer. But on product detail page it's not showing random 5 product of respective manufacturer for that product !!

Can any one please help me to resolve this issue ?
__________________
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
----------------
Reply With Quote
  #47  
Old 11-20-2009, 03:36 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Thumbs up Re: More Effective Manufacturer view on Product Detail Page

Quote:
Originally Posted by anandat
This module working for me till now but as soon as I replaced the products with new description (through csv file upload)it stopped showing the "random 5 products from manufacturer with image, price, name" in the product detail page!!!

I double checked that manufacturers has been alloted to each product correctly & I can browse the products through manufacturer. But on product detail page it's not showing random 5 product of respective manufacturer for that product !!

Can any one please help me to resolve this issue ?
OK...I just resolved this issue. I don't know but there was some problem with CSV file. I tried to upload old csv file & again it's showing random 5 products from manufacturers.
__________________
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
----------------
Reply With Quote
  #48  
Old 12-08-2009, 09:13 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: More Effective Manufacturer view on Product Detail Page

Has anyone figured out how to not display the current product in the "other products from this manufacturer" display?

Has anyone figured out how to not display duplicates of the same product in the "other products from this manufacturer" display?

Other than this, the mod works great, and we will probably use it anyway, but it would be nice if these quirks were eliminated.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #49  
Old 12-26-2009, 02:58 AM
  Dan.roh's Avatar 
Dan.roh Dan.roh is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 397
 

Default Re: More Effective Manufacturer view on Product Detail Page

Thanks Micromedia,

Please help, I can't get it to work. The error I am getting is:

Warning: Smarty error: unable to read resource: "modules/Manufacturers/manufacturerinfo.tpl" in /home/custom/public_html/Smarty-2.6.19/Smarty.class.php on line 1092

Your help would be very much appreciated

Thanks




Quote:
Originally Posted by micromedia
This is more effective manufatucrer modul for product detail page. It is working on x-cart gold 4.1.6

manufacturer image,
manufacturer name,
link on this manufacturer page,

random 5 products from manufacturer with image, price, name


Create
modules/Manufacturers/manufacturerinfo.php

Code:
<? if ( !defined('XCART_SESSION_START') ) { header("Location: ../../"); die("Access denied"); } $query = "SELECT $sql_tbl[products].productid, $sql_tbl[products].product, $sql_tbl[products].descr, $sql_tbl[pricing].price FROM $sql_tbl[products],$sql_tbl[pricing] WHERE $sql_tbl[products].forsale='Y' AND $sql_tbl[products].avail > 0 AND $sql_tbl[products].productid = $sql_tbl[pricing].productid AND $sql_tbl[products].manufacturerid = '$product_info[manufacturerid]' ORDER BY RAND() LIMIT 5" ; $manufacturerinfos = func_query($query); $smarty->assign("manufacturerinfos",$manufacturerinfos); ?>



Create
modules/Manufacturers/manufacturerinfo.tpl


Code:
{* $Id: manufacturerinfo.tpl,v 1.8.2.1 2007/03/19 13:12:29 max Exp $ *} {if $product.manufacturer ne ""} {if $manufacturerinfos} {capture name=dialog } <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="left" style="padding:5px;" valign="top"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><img src="image.php?id={$product.manufacturerid}&type=M " alt="{$manufacturer}" border="0" /></a></td> <td align="left" style="padding:5px;" valign="top" width="100%"><a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><b>{$product.manufacturer}</b></a><br /> {$product.manudescr|truncate:250:"...":true} <br /> <br /> <a href="manufacturers.php?manufacturerid={$product.manufacturerid}"><u>See All Products</u></a></td> </tr> </table> <hr/> <table width="100%" cellpadding="0" cellspacing="0"> <tr > {foreach from=$manufacturerinfos item=manufacturerinfo } <td width="20%" valign="top"><div style="border:1px solid #ccc;padding:5px;margin:5px; text-align:center"> <a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> <font class="ProductTitle">{$manufacturerinfo.product}</font></a><br /> <a href="product.php?productid={$manufacturerinfo.productid}&amp;cat={$cat}&amp;manufacturerinfo"> {include file="product_thumbnail.tpl" image_x=75 productid=$manufacturerinfo.productid product=$manufacturerinfo.product} </a><br /> <font class="ProductPrice"> Our Price:&nbsp; {include file="currency.tpl" value=$manufacturerinfo.price}</font><br /> {if $manufacturerinfo.list_price gt 0} <font class="MarketPrice"> Market Price:&nbsp;<s>{include file="currency.tpl" value=$manufacturerinfo.list_price}</s> </font> <br /> {/if} <font size="1"> {$manufacturerinfo.descr|truncate:50:"...":true}</font><br /> </div></td> {/foreach} </tr> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'} {/if} {/if}



EDIT product.php

After:
Code:
if ($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";


Add
Code:
if ($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/manufacturerinfo.php";


EDIT skin1/customer/main/product.tpl

Add

Code:
{include file="modules/Manufacturers/manufacturerinfo.tpl" }
__________________
Regards

Dan


Xcart version:
4.1.10 GOLD
Reply With Quote
  #50  
Old 12-31-2009, 05:54 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: More Effective Manufacturer view on Product Detail Page

Is the manufacturerinfo.tpl where it is supposed to be? It should be at(x-cart root)/skin1/modules/Manufacturers/manufacturerinfo.tpl
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
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 11:47 AM.

   

 
X-Cart forums © 2001-2020