magento的修改记录
1. 去掉主题首页的 shopper_banners_slideshow 和 newsletter/subscribe(demo文件夹下的模版)
A. 登录后台
B. 进入CMS -> Page -> Manage Content
C. 找到Shopper Home page - right column
D. 删除
{{block type="cms/block" block_id="shopper_banners_slideshow" }} {{block type="newsletter/subscribe" template="newsletter/subscribe_home.phtml" }} 这段代码
2. 修改shopper 的底部banner区域(demo文件夹下的模版)
A. 登录后台
B. 进入CMS -> Static Blocks
C. 找到Shopper Footer banners,并且点击进去
D. 修改代码,将下面的代码修改为你自己的代码
<div class="row clearfix"> <div class="grid_6"><a title="free shipping on orders over $100" href="//queldorei.com/"><img src="{{media url="queldorei/shopper/footer_banner_1.png"}}" alt="" /></a></div> <div class="grid_6"><a title="call us! toll free 8-800-123-1234" href="//queldorei.com"><img src="{{media url="queldorei/shopper/footer_banner_2.png"}}" alt="" /></a></div> </div>
3. 关闭shopper模板的产品详细信息页的custom tab(shopper文件夹下的模版)
A. 登录后台
B. 进入CMS -> Static Blocks
C. 找到shopper_custom_tab,并且点击进去
D. 取消激活shopper_custom_tab
4. 将产品信息页面的Additional 与 description调换位置(shopper文件夹下的模版)
frontend/shopper/default/layout/local.xml 第327行,将以下代码更换位置
<action method="addTab" translate="title" module="catalog" > <alias>additional_tabbed</alias> <title>Additional</title> <block>catalog/product_view_attributes</block> <template>catalog/product/view/attributes.phtml</template> </action>
<action method="addTab" translate="title" module="catalog" > <alias>description_tabbed</alias> <title>Description</title> <block>catalog/product_view_description</block> <template>catalog/product/view/description.phtml</template> </action>
5. 去掉shopper 产品详细页面的“分类标题”与“next product”
A. frontend/shopper/default/template/catalog/product/view.phtml
删除掉下面代码即可去掉 分类标题
if ($_category) { echo '<div class="product-category-title">'.$_category->getName().'</div>'; }
B. shopper/default/layout/inchoo/prevnext/prevnext.xml
注释掉整个xml文件中的内容,即可删除next product
6. 在description中显示gallery图片的方法
A. 复制base/default/template/catalog/product/view/description.phtml 到 default/template/catalog/product/view/description.phtml
B. 在<div class="std">的下方加上
<?php $gallery_images = $this->getProduct()->getMediaGalleryImages() ?> <?php if (sizeof($gallery_images) > 0): ?> <?php $counter = 0 ?> <?php foreach ($gallery_images as $_image): ?> <?php $counter++ ?> <?php $_helper_image = $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile()) ?> <p><img src="<?php echo $_helper_image->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(900); ?>" width="<?php echo $_helper_image->getOriginalWidth() ?>" height="<?php echo $_helper_image->getOriginalHeigh() ?>" alt="" /></p> <?php if (5 === $counter) break; ?> <?php endforeach ?> <?php endif ?>
7. 自定义的magento account dashboard
A. 去掉My applications,找到oauth.xml文件,注释121行至125行
B. 去掉My Downloadable Products,找到downloadable.xml文件,注释掉第33行
8. 将Quantity从价格的下面,放到addtocart的上方
A. 打shopper/default/template/catalog/product/view.html,将以下代码注释,这样就能将quantity从价格的下方隐藏
<?php if (FALSE): //!$_product->isGrouped() ?> <div class="qty-container clearfix"> <label for="qty"><?php echo $this->__('Qty') ?>:</label> <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" /> </div> <?php endif; ?>
B. 在shopper/default/layout/local.xml中找到<reference name="product.info">,然后在</reference>的上面加上下面一段代码
<block type="catalog/product_view" name="product.info.qty" as="product_info_qty" template="catalog/product/view/qty.phtml"/>
C. 在shopper/default/layout/local.xml的265行,加入以下代码
<reference name="product.info.options.wrapper"> <action method="append"> <block>product.info.qty</block> </action> </reference>
9. 去掉产品详细页的“add to cart”按钮下面的 Add wishlist、Email to Friend 的方法
打开文件frontend/shopper/default/layout/catalog.xml,注释掉下面这行代码
<!--block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml" /-->
10. 让RECENTLY VIEWED PRODUCTS在每个分类的左侧都能显示,而不是仅在有“子类”的父类下显示的方法
打开 frontend/shopper/layout/reports.xml 注释掉以下代码
<catalog_category_layered_nochildren translate="label"> <label>Catalog Category (Without Subcategories)</label> <remove name="right.reports.product.viewed" /> <reference name="right"> <block type="reports/product_viewed" before="right.permanent.callout" name="left.reports.product.viewed" template="reports/product_viewed.phtml" /> </reference> </catalog_category_layered_nochildren>