Guest Posted April 17, 2010 Share Posted April 17, 2010 请教:我想将top seller ,new products modules 移致首页的 center column.请教怎么操作,在哪里改? Link to comment Share on other sites More sharing options...
21846657 Posted April 18, 2010 Share Posted April 18, 2010 1. BO >> Modules >> Positions >> Remove the original positions and transplant the modules to the hook of Homepage content2. Alter CSS and smarty templates of the modules if necessary, on a basis of the layout of center column at homepageps. Sorry that Im not able to type Chinese until I get the full access to my laptop. Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2010 Share Posted April 18, 2010 谢谢,第一步已经尝试过了,无法直接达到想要的效果。问题估计在第二步,在install这两模块时就需指定植入首页的那个column了,参考相关代码如下,以"\modules\blockbestsellers\blockbestsellers.php"为例 public function install() { if (!parent::install() OR !$this->registerHook('rightColumn') OR !$this->registerHook('updateOrderStatus') OR !ProductSale::fillProductSales()) return false; return true; } function hookRightColumn($params) { global $smarty; $currency = new Currency(intval($params['cookie']->id_currency)); $bestsellers = ProductSale::getBestSalesLight(intval($params['cookie']->id_lang), 0, 5); $best_sellers = array(); foreach ($bestsellers AS $bestseller) { $bestseller['price'] = Tools::displayPrice(Product::getPriceStatic(intval($bestseller['id_product'])), $currency); $best_sellers[] = $bestseller; } $smarty->assign(array( 'best_sellers' => $best_sellers, 'mediumSize' => Image::getSize('medium'))); return $this->display(__FILE__, 'blockbestsellers.tpl'); } function hookLeftColumn($params) { return $this->hookRightColumn($params); } 但不知道怎么修改,请指教 Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2010 Share Posted April 18, 2010 有人回答吗? Link to comment Share on other sites More sharing options...
21846657 Posted April 19, 2010 Share Posted April 19, 2010 你需要修改的是blockbestsellers.tpl、blocknewproducts.tpl和global.css里对应的CSS,不是PHP。 Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2010 Share Posted April 19, 2010 谢谢版主,已经解决了,HereThanks for your time and your help. Link to comment Share on other sites More sharing options...
21846657 Posted April 19, 2010 Share Posted April 19, 2010 awesome! =)) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now