Magento: Create CMS Page & Static Block programmatically

You can manually create CMS Pages in Magento from CMS -> Pages. Similarly, you can create Static Blocks from CMS -> Static Blocks. This article will show how to create CMS pages and Static blocks programmatically from code. Create CMS Page Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $cmsPage = array( 'title' => 'Test Page', 'identifier' => 'test-page', 'content' => 'Sample Test Page', 'is_active' => 1, 'sort_order' => 0, 'stores' => array(0), 'root_template' => 'three_columns' ); Mage::getModel('cms/page')->setData($cmsPage)->save();
查看更多 →

Magento获取当前购物车产品总数量和总价格

Here, I will show you how you can get information about all items in your Magento Shopping Cart. You will see how you can :-) Get products id, name, price, quantity, etc. present in your cart. Get number of items in cart and total quantity in cart. Get base total price and grand total price of items in cart. Get all items information in cart // $items = Mage::getModel('checkout/cart')->getQuote()->getAllItems(); $items
查看更多 →

Magento中如何为Group Product添加图片

Magento中,Group Product可以上传图片,但是他下面list的产品没有图片,那如何为这些list添加图片呢,其实很简单的: 找到
查看更多 →

如何解决Magento导出产品时出现500错误

当我们使用Magento的export功能时候,跳转过去,一直loading,最后变成500 error。这让人很抓狂,通过Google搜索,
查看更多 →

Magento下Contact Form添加自定义字段

很多时候,Magento自带的contact form的字段并不符合我们的要求,我们会在原有的基础上面增加某些字段,那应该如何进行操作呢?下面
查看更多 →