magento问题集
magento產品頁面價格出現2遍
In app\design\frontend\default\default\template\catalog\product\view\type\Simple.phtml
Just change…
TO
<!-- <block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml" /> -->注釋掉就可以了.
Magento Homepage
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}} <reference name="left"> <block type=" amshopby/catalog_layer_view " name="amshopby.navleft" after="currency" template="catalog/layer/view.phtml"/> </reference> {{block type="catalog/product_list" column_count="4" category_id="7" template="catalog/product/list.phtml"}}The homepage is set from the admin side.
but if you want to add content yo your homepage from the layout files just edit the content of the?<cms_index_index>tag in the cms.xml file.
Adding CMS Layout Templates
Demystifying Magento’s Layout XML – Part 1
Magento. Display new products on the home page (XML)
http://www.templatemonster.com/help/magento-display-new-products-on-the-home-page-xml.html
如何修改magento默認的產品圖片的大小尺寸
第一個地方,產品列表頁的產品圖片
文件位置:app\design\frontend\default\helloblank\template\catalog\product\list.phtml
在此文件中搜 “resize”,發現有兩處,因為列表頁有 List 和 Grid 兩種顯示方式,第一個resize一般是List列表顯示中的產品圖片,第二個resize一般是 Grid 列表顯示中的產品圖片。
截取代碼片段:
代碼分析:
resize(135, 135),就是設置產品圖片 尺寸的函數,以像素為單位的。width=”135″ height=”135″就是css的設置。例如,想改成 150像素寬,200像素高。那么代碼就改成
第二個地方,產品詳細頁產品圖片
文件位置:app\design\frontend\default\helloblank\template\catalog\product\view\media.phtml
在此文件中搜“resize”。我們會找到兩處,第一處是產品大圖的,第二個是大圖下面小圖的。
代碼片段截取:
代碼分析:
當resize里面只有一個參數的時候就是設置寬和高是一樣的。resize(265) 等于resize(265,256)。
這頁有大量css的修飾代碼,請務必用firebug等工具檢查下,最大可以修改到多大
第三個地方,相關產品圖片,upsell產品圖片,crosssell產品圖片
相關產品圖片修改文件位置:app\design\frontend\default\helloblank\template\catalog\product\list\related.phtml
upsell產品圖片修改文件位置:app\design\frontend\default\helloblank\template\catalog \product\list\upsell.phtml
crosssell產品圖片修改文件位置:app\design\frontend\default\helloblank\template\checkout\cart\upsell.phtml
設置圖尺寸的函數還是resize()函數,也基本和前面說的是一樣的。
第四個地方,頁面邊欄購物車里產品圖片
文件位置:app\design\frontend\default\helloblank\template\checkout\cart\item\default.phtml
基本就這些了,還有別的地方要改的,開啟下magento模板路徑看下,在哪里,改的方法也一樣。最重要的是,要和你的css修飾代碼配合好。
Magento如何刪除Add to Compare和Add to Wishlist
app/design/frontend/default/yourtheme/template/catalog/product / List.phtml
移除
如僅僅需要移除 add to compare.則
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?><li><span class="separator">|</span> <a rel="nofollow" href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li><?php endif; ?>如果你想要清除者兩個模塊以實現節省那么一點點資源的目的那么可以參照magento官方相關介紹
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/how_to_remove_add_to_compare
innodb-fix.sql
alter table admin_assert engine=innodb; alter table admin_role engine=innodb; alter table admin_rule engine=innodb;alter table admin_user engine=innodb; alter table adminnotification_inbox engine=innodb; alter table catalog_category_entity engine=innodb; alter table catalog_category_entity_datetime engine=innodb; alter table catalog_category_entity_decimal engine=innodb; alter table catalog_category_entity_int engine=innodb; alter table catalog_category_entity_text engine=innodb; alter table catalog_category_entity_varchar engine=innodb; alter table catalog_category_product engine=innodb; alter table catalog_category_product_index engine=innodb; alter table catalog_compare_item engine=innodb; alter table catalog_product_bundle_option engine=innodb; alter table catalog_product_bundle_option_link engine=innodb; alter table catalog_product_bundle_option_value engine=innodb; alter table catalog_product_bundle_selection engine=innodb; alter table catalog_product_enabled_index engine=innodb; alter table catalog_product_entity engine=innodb; alter table catalog_product_entity_datetime engine=innodb; alter table catalog_product_entity_decimal engine=innodb; alter table catalog_product_entity_gallery engine=innodb; alter table catalog_product_entity_int engine=innodb; alter table catalog_product_entity_media_gallery engine=innodb; alter table catalog_product_entity_media_gallery_value engine=innodb; alter table catalog_product_entity_text engine=innodb; alter table catalog_product_entity_tier_price engine=innodb; alter table catalog_product_entity_varchar engine=innodb; alter table catalog_product_link engine=innodb; alter table catalog_product_link_attribute engine=innodb; alter table catalog_product_link_attribute_decimal engine=innodb; alter table catalog_product_link_attribute_int engine=innodb; alter table catalog_product_link_attribute_varchar engine=innodb; alter table catalog_product_link_type engine=innodb; alter table catalog_product_option engine=innodb; alter table catalog_product_option_price engine=innodb; alter table catalog_product_option_title engine=innodb; alter table catalog_product_option_type_price engine=innodb; alter table catalog_product_option_type_title engine=innodb; alter table catalog_product_option_type_value engine=innodb; alter table catalog_product_super_attribute engine=innodb; alter table catalog_product_super_attribute_label engine=innodb; alter table catalog_product_super_attribute_pricing engine=innodb; alter table catalog_product_super_link engine=innodb; alter table catalog_product_website engine=innodb; alter table catalogindex_eav engine=innodb; alter table catalogindex_minimal_price engine=innodb; alter table catalogindex_price engine=innodb; alter table cataloginventory_stock engine=innodb; alter table cataloginventory_stock_item engine=innodb; alter table catalogrule engine=innodb; alter table catalogrule_product engine=innodb; alter table catalogrule_product_price engine=innodb; alter table catalogsearch_query engine=innodb; alter table checkout_agreement engine=innodb; alter table checkout_agreement_store engine=innodb; alter table cms_block engine=innodb; alter table cms_block_store engine=innodb; alter table cms_page engine=innodb; alter table cms_page_store engine=innodb; alter table core_config_data engine=
轉載于:https://www.cnblogs.com/focai/p/4484792.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的magento问题集的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 国内2大Git代码托管网站
- 下一篇: 修改TOMCAT服务器图标为应用LOGO