日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

magento问题集

發布時間:2024/7/19 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 magento问题集 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

magento產品頁面價格出現2遍

In app\design\frontend\default\default\template\catalog\product\view\type\Simple.phtml
Just change…

<block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml" />

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

<reference name="content"> <block type="catalog/product_new" name="product_new" template="catalog/product/list.phtml"> <action method="setColumnCount"><column_count>6</column_count></action> <action method="setProductsCount"><count>0</count></action> </block> </reference>

如何修改magento默認的產品圖片的大小尺寸

第一個地方,產品列表頁的產品圖片

文件位置:app\design\frontend\default\helloblank\template\catalog\product\list.phtml
在此文件中搜 “resize”,發現有兩處,因為列表頁有 List 和 Grid 兩種顯示方式,第一個resize一般是List列表顯示中的產品圖片,第二個resize一般是 Grid 列表顯示中的產品圖片。
截取代碼片段:

$this->helper(‘catalog/image’)->init($_product, ‘small_image’)->resize(135, 135); ?>” width=”135″ height=”135″

代碼分析:
resize(135, 135),就是設置產品圖片 尺寸的函數,以像素為單位的。width=”135″ height=”135″就是css的設置。例如,想改成 150像素寬,200像素高。那么代碼就改成

$this->helper(‘catalog/image’)->init($_product, ‘small_image’)->resize(150, 200); ?>” width=”150″ height=”200″

第二個地方,產品詳細頁產品圖片

文件位置:app\design\frontend\default\helloblank\template\catalog\product\view\media.phtml
在此文件中搜“resize”。我們會找到兩處,第一處是產品大圖的,第二個是大圖下面小圖的。
代碼片段截取:

resize(265) resize(48, 48); ?>” width=”48″ height=”48″

代碼分析:
當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
移除

<ul class="add-to-links"><?php if ($this->helper('wishlist')->isAllow()) : ?><li><a rel="nofollow" href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li><?php endif; ?><?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; ?></ul>

如僅僅需要移除 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问题集的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。