曼波建站搜索
热门搜索  曼波虚拟主机  多线主机  主机租用  主机托管  VPS 主机  智能建站  自助建站  曼波建站培训

PhpShop

Wikipedia,自由的百科全书

目录

介绍

安装

相关模块

randomprod图片滚动模块

1.mod_phpshop_randomprod滚动问题

问题描述:

这个模块可以滚动显示phpshop的商品,但是当我选择显示5个商品并向右滚动时,它并没有显示为 1行 5个产品,而是显示成5行,每行1个产品,非常不美观

解决方法:

编辑mod_productscroller.php ,将 the function displayScroller的代码更换即可。 新代码:

/** 
* Display Product Data 
*/ 
function displayScroller (&$rows) { 
global $database, $mosConfig_absolute_path; 

require_once( $mosConfig_absolute_path."/components/com_phpshop/phpshop_parser.php" ); 
require_once( CLASSPATH."ps_product.php" ); 
$ps_product = new ps_product; 

$cnt=0; 
if($this->ScrollCSSOverride=='yes') { 
$txt_size = $this->ScrollTextSize . 'px'; 
$margin = $this->ScrollMargin . 'px'; 
//$height=($height-intval($margin+0)); 
//$width=($width-intval($margin+30)); 
echo $this->params->get( 'pretext', ""); 
echo " <div style=\"text-align:".$this->ScrollAlign.";background-color: ".$this->ScrollBGColor."; width:".$this->ScrollWidth."; 
margin-top: $margin; margin-right: $margin; margin-bottom: $margin; margin-left: $margin;\" > 
<marquee behavior=\"".$this->ScrollBehavior."\" 
direction=\"".$this->ScrollDirection."\" 
height=\"".$this->ScrollHeight."\" 
width=\"".$this->ScrollWidth."\" 
scrollamount=\"".$this->NumberOfProducts."\" 
scrolldelay=\"".$this->ScrollDelay."\" 
truespeed=\"true\" onmouseover=\"this.stop()\" onmouseout=\"this.start()\" 
style=\"text-align: ".$this->ScrollTextAlign."; color: ".$this->ScrollTextColor."; font-weight: ".$this->ScrollTextWeight."; font-size: $txt_size\;\" >"; 
} 
else { 

echo " <div style=\"width:".$this->ScrollWidth.";text-align:".$this->ScrollAlign.";\"> 
<marquee behavior=\"".$this->ScrollBehavior."\" 
direction=\"".$this->ScrollDirection."\" 
height=\"".$this->ScrollHeight."\" 
width=\"".$this->ScrollWidth."\" 
scrollamount=\"".$this->NumberOfProducts."\" 
scrolldelay=\"".$this->ScrollDelay."\" 
truespeed=\"true\" onmouseover=\"this.stop()\" onmouseout=\"this.start()\">"; 
} 
$show_addtocart = ( $this->show_addtocart == "yes" ) ? true : false; 
$show_price = ( $this->show_price == "yes" ) ? true : false; 
if (($this->ScrollDirection=='left') || ($this->ScrollDirection=='right')) { 
echo "<table><tr>"; 
} 
$i = 0; 
foreach($rows as $row) { 
if (($this->ScrollDirection=='left') || ($this->ScrollDirection=='right')) { 
echo "<td>"; 
} 

$ps_product->show_snapshot( $row->product_sku, $show_price, $show_addtocart ); 

if (($this->ScrollDirection=='left') || ($this->ScrollDirection=='right')) { 
echo "</td>"; 
} 
else { 
for($i=0;$i<$this->ScrollLineCharTimes;$i++) { 
echo $this->ScrollLineChar; 
} 
} 
$i++; 
} 
if (($this->ScrollDirection=='left') || ($this->ScrollDirection=='right')) { 
echo "</tr></table>"; 
} 
echo " </marquee> 
</div>"; 
} // end displayScroller

其他问题

Personal tools