metta Posted January 25, 2010 Share Posted January 25, 2010 版主, 你知道如何做这吗? 我想哭了....http://www.prestashop.com/forums/viewthread/31247/#145155http://www.prestashop.com/forums/viewthread/30741/#184634 Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 1. 首先在你的DB里,加入你自定义的hook,比如(你所用的)"productHeader"2. 在blockpnav.php里,大概57行后,加入: function hookProductHeader($params) { return $this->hookExtraLeft($params); } 3. 在Back Office >> Modules >> Positions里,移除原来的productFooter的hook。4. Transplant到blockpnav到ProductHeader。这时,你应该在Back Office >> Modules >> Positions >> Product Header里看到它。5. 在你的模板文件product.tpl里,适当的位置加入: {if $HOOK_PRODUCT_HEADER}{$HOOK_PRODUCT_HEADER}{/if} 6. 清楚cache后,测试。 Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 也许,还有其他styling的工作要做。Good luck! Link to comment Share on other sites More sharing options...
metta Posted January 25, 2010 Author Share Posted January 25, 2010 1. 首先在你的DB里,加入你自定义的hook,比如(你所用的)"productHeader"2. 在blockpnav.php里,大概57行后,加入: function hookProductHeader($params) { return $this->hookExtraLeft($params); } 3. 在Back Office >> Modules >> Positions里,移除原来的productFooter的hook。4. Transplant到blockpnav到ProductHeader。这时,你应该在Back Office >> Modules >> Positions >> Product Header里看到它。5. 在你的模板文件product.tpl里,适当的位置加入: {if $HOOK_PRODUCT_HEADER}{$HOOK_PRODUCT_HEADER}{/if} 6. 清楚cache后,测试。 After I added the function hookProductHeader($params) { return $this->hookExtraLeft($params); } it gave me error. Fatal error: Cannot redeclare BlockPNav::hookProductHeader() in /home/content/momain/modules/blockpnav/blockpnav.php on line 60My line 60 is function hookProductHeader($params).Do you know what is wrong? Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 是安装后出现的问题吗?如果是,那第一步就没有成功加入productHeader到DB里。 Link to comment Share on other sites More sharing options...
metta Posted January 25, 2010 Author Share Posted January 25, 2010 是安装后出现的问题吗?如果是,那第一步就没有成功加入productHeader到DB里。 No, before 安装. Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 也就是说,copy到modules文件夹下,就可以在BO >> Modules里看到这个fatal error?你确认你成功完成第一步? Link to comment Share on other sites More sharing options...
metta Posted January 25, 2010 Author Share Posted January 25, 2010 也就是说,copy到modules文件夹下,就可以在BO >> Modules里看到这个fatal error?你确认你成功完成第一步? Yes Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 请把blockpnav.php文件附上。 Link to comment Share on other sites More sharing options...
metta Posted January 25, 2010 Author Share Posted January 25, 2010 This is it. Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 Use mine instead and good luck. blockpnav.php Link to comment Share on other sites More sharing options...
metta Posted January 25, 2010 Author Share Posted January 25, 2010 It went here, and I don't know how to delete it as it is not in the BO Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 3. 在Back Office >> Modules >> Positions里(选择Display non-positionnable hook 后),移除之前的hook。你的应该是在“Extra actions on the product page (left column). - 1 module”里。 Link to comment Share on other sites More sharing options...
metta Posted January 25, 2010 Author Share Posted January 25, 2010 Okay. I deleted it. And where can I put the codes so that it will show as the image. {if $HOOK_PRODUCT_HEADER}{$HOOK_PRODUCT_HEADER}{/if} I put it in the line 97, and it doesn't show at all. {include file=$tpl_dir./breadcrumb.tpl} {$product->name|escape:'htmlall':'UTF-8'} {if $confirmation} {$confirmation} {/if} {if $HOOK_PRODUCT_HEADER}{$HOOK_PRODUCT_HEADER}{/if} <!-- right infos--> <!-- product img--> {if $have_image} getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/> {else} name|escape:'htmlall':'UTF-8'}" /> {/if} Link to comment Share on other sites More sharing options...
21846657 Posted January 25, 2010 Share Posted January 25, 2010 Well then that's a styling work. I suppose you should modify blockpnav.tpl, product.tpl and global.css to cater for your theme. The blockpnav module works after all. Link to comment Share on other sites More sharing options...
Star Posted January 25, 2010 Share Posted January 25, 2010 Metta,Let 版主 rest. I will see what I can do. Okay? He had enough for today. I will do it for you. Link to comment Share on other sites More sharing options...
21846657 Posted January 27, 2010 Share Posted January 27, 2010 @Star, I heard of it. Peace, I think, is all we need. Take care.May Peace,21846657 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