<?php
// get category model by category id, assume you have known category id, $categoryId
$_category = Mage::getModel('catalog/category')->load($categoryId);
// category name
$categoryName = $_category->getName();
// category description
$categoryDescription = $_category->getDescription();
// category url
$categoryUrl =… Read More
By default in magento there is no qty field of simple product for custom option. If you want to add qty as per your custom option you can add now using this post.
Suppose you have custom option ‘Color: Red, Blue, White‘ of your simple product and you want to add different qty option for your
将安装的wordpress表前缀由默认的 wp_修改为其它了,再次登陆后台后出现
You do not have sufficient permissions to access this page.
网上搜索了一下,说是修改检查 wp_usermeta 表中的 wp_capabilities, wp_user_level 数值,但是无效,再搜索发现如下方法解决问题
步骤1.
将wp_usermeta 表中对应wp_前缀设置的
wp_capabilities, wp_user_level,wp_autosave_draft_ids 的前缀 wp_ 修改为新的前缀
步骤2.
将wp_options 中wp_user_roles 前缀 wp_ 修改为新的前缀… Read More
My Application was working fine yesterday. I started my Pc today when I tried to start magento I Got This Error message.
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
I am not able to Open even admin page and I
方法一: 安装插件 Sort By Date(https://www.magentocommerce.com/magento-connect/sort-by-date.html)
方法二: 非插件
Today I had to change Magento default products list sorting to sort by product’s date. In fact we don’t need to sort by date, just by entity_id which is product ID in Magento world. To accomplish this, we need to edit /app/code/core/Mage/Catalog/Blo… Read More
1. 首先,自定义添加区域,安装插件 Extended Newsletter Subscription (https://www.magentocommerce.com/magento-connect/extended-newsletter-subscription.html)
下载包:Mediarocks_NewsletterExtended-0.3.5
2. 添加到footer
your theme is located at /app/design/frontend/default/mytemplate/layout/local.xml
<?xml version="1.0"?>
<layo… Read More
方法一:
In your theme located at app/design/frontend/YOUR_THEME/YOUR_TEMPLATE/layout/local.xml just add the code below:
<?xml version="1.0"?>
<layout>
<default><!-- use for all pages -->
<reference name="head">
<action method="addLinkRel"><rel>stylesheet</rel><href>//fon… Read More
方法一:
Open /app/design/adminhtml/default/default/template/catalog/product/edit.phtml and add the following code to the bottom of the file:
<?php
$dbread = Mage::getSingleton('core/resource')->getConnection('core_read');
$sql = $dbread->query("SELECT * FROM catalog_product_entity ORDER BY created_at DESC LIMIT 1");
$res = $… Read More
You can rewrite the method Mage_Adminhtml_Catalog_ProductController::validateAction() and check if the product is new and category_ids hasn’t been sent through POST then throw an exception.
Something like this: app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
public function validateAction()
{
$response… Read More
1. 下拉框 Select Box
You have plain text and link to those text in Magento Layered Navigation section. You can easily change the display of Layered Navigation links into a selection box / dropdown list. To do so, you need to edit the following file:
app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/catalog/layer/filter.phtml
filter.phtml file con… Read More