Magento如何更改后台url路径
Here is a quick guide on how to change admin url path in Magento. This need to be done for security reason to be safe from hacking/cracking issue. Basically, this is done not to let any general user to access the admin page. Generally, we do have ‘admin’ as the administrator path for Magento. So, the admin URL will be http://www.example.com/admin/ This article will show you, how you can change
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