Whenever you have a product object, you can access its attribute set like this:
$attributeSetModel = Mage::getModel("eav/entity_attribute_set");
$attributeSetModel->load($product->getAttributeSetId());
$attributeSetName = $attributeSetModel->getAttributeSetName();
$attributeSetId = $attributeSetModel->getAttri… Read More
Error : Maximum execution time of 30 seconds exceeded in Magento.
Solution: You need to increase your maximum execution time for php scripts on your server. You can edit your php.ini file to increase this value
max_execution_time = 600
or
You can try adding the following line at the start of your file on which you are facing error.
For
config.php file:
$CFG->debug = 38911; $CFG->debugdisplay = true;
For Moodle 2.0 the possible settings are as follows:
// Force a debugging mode regardless the settings in the site administration
// @error_reporting(1023); // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
$CFG->debug = 32767… Read More
Here is a little something to use on template/catalog/product/view.phtml page. I got few inquiries on how to get the “in_stock” status of a product. Here is a working sample code that shows different messages when and if the product is in stock or out of stock.
<?php // Check to see if the item is in
Find the local.xml in local \magentoappetclocal.xml
<pre class="brush:xml">
<config>
…
<db>
<table_prefix><![CDATA></table_prefix>
</db>
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[bobjaneg_use… Read More
Download Magento Extension
使用下面的链接下载插件。然后上传也可以。
http://freegento.com/ddl-magento-extension.php
输入key之后,网页直接给出下载链接。点击直接下载即可。
另外还有一个比较好的:
http://www.tangkoko.com/direct-download-magento-extension/
一般 情况下最好还是使用magento connect直接安装插件。
手动下载
Format of the URL:
http://connect20.magentocommerce.com/communi… Read More
We know Magento support multiple currency. I have found the solution to check current currency in the Magento site frontend
To get Current Currency
<?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>
If you looking for current currency symbol use :
<?php echo Mage::app()->getLocale()-&g… Read More