Transferring one opensource database to other is a common headache.Recently i faced this problem when i need to move the…
4x Masonry Grid
Here, I will show you, how you can change your order status programmatically (with PHP coding). First, you need to…
Display Top Level Categories Only <?php $_helper = Mage::helper(‘catalog/category’) ?><?php $_categories = $_helper->getStoreCategories() ?><?php if (count($_categories) > 0): ?><ul><?php foreach($_categories…
$productId = ‘SOME_PRODUCT_ID’; $product = Mage::getModel(‘catalog/product’)->load($productId); $productMediaConfig = Mage::getModel(‘catalog/product_media_config’); $baseImageUrl = $productMediaConfig->getMediaUrl($product->getImage()); $smallImageUrl = $productMediaConfig->getMediaUrl($product->getSmallImage()); $thumbnailUrl = $productMediaConfig->getMediaUrl($product->getThumbnail());
$entityTypeId = Mage::getModel(‘eav/entity’)->setType(‘catalog_product’)->getTypeId();$attributeSetName = ‘Default’; //Edit with your required Attribute Set Name$attributeSetId = Mage::getModel(‘eav/entity_attribute_set’)->getCollection()->setEntityTypeFilter($entityTypeId)->addFieldToFilter(‘attribute_set_name’, $attributeSetName)->getFirstItem()->getAttributeSetId();$attributesInfo = Mage::getResourceModel(‘eav/entity_attribute_collection’)->setEntityTypeFilter($attributeSetId) //4 = product…
here is the process to enable the error printing in magento 1. go to magentoRoot/errors folder and make the copy…
Use below 2 magneto event to dispatch event in magento <controller_action_predispatch><observers><pioc_backoffice_shipping_observer><class>PIOC_Backoffice_Model_Shipping_Observer</class><method>hookToControllerActionPreDispatch</method></pioc_backoffice_shipping_observer></observers></controller_action_predispatch> <controller_action_postdispatch><observers><pioc_backoffice_shipping_observer><class>PIOC_Backoffice_Model_Shipping_Observer</class><method>hookToControllerActionPostDispatch</method></pioc_backoffice_shipping_observer></observers></controller_action_postdispatch> The below are 2 custom event that we…
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 `api_assert` ENGINE=InnoDB;ALTER TABLE…
//////////////////////////////////// template/catalog/product/list/toolbar.phtml <div class=”demoTarget toolbar”> <span class=”pagingTotal”>Order:</span> <?php /*?><select onchange=”setLocation(this.value)” id=”default-usage-selectdate”> <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?> <option value=”<?php echo $this->getOrderUrl($_key,…
Here is how you could hide the shopping cart side bar when it is empty: 1. Open: app/design/frontend/default/<your template>/template/checkout/cart/sidebar.phtml 2….
<?php // load product /** @var Mage_Catalog_Model_Product $product */ $product = Mage::getModel(‘catalog/product’) ->setStoreId($storeId) ->load($productId); // set length of coupon…
To create the custom attribute for category we have two option 1) Make a copy of your app/code/core/Mage/Catalog/sql/catalog_setup and change…
1)appdesignfrontenddefaultmagikjewellerylayoutcatalog.xml Change <block type=”catalog/product_list_upsell” name=”product.info.upsell” as=”upsell_products” template=”catalog/product/list/upsell.phtml”> <action method=”setColumnCount”><columns>4</columns></action> <action method=”setItemLimit”><type>upsell</type><limit>4</limit></action> </block> With <block type=”catalog/product_list_related” name=”product.info.related” template=”catalog/product/list/related.phtml”…
appcodecoreMageCoreModelSessionAbstractvarien.php comment following line // call_user_func_array(‘session_set_cookie_params’, $cookieParams);
top.phtml in app/design/frontend/default/yourtheme/template/catalog/navigation/
<script> setTimeout(function(){ location.href = ‘<?php echo $this->getUrl() ?>’},5000);</script>
The solution for this modify the core Magento code. Open the page app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. Comment out the lines 80 to 83….
<block type=“reports/product_viewed” name=“reports.product.viewed” as=“recently_viewed” template=“reports/product_viewed.phtml”> <action method=“setColumnCount”> <columns>4</columns> </action> <action method=“setItemLimit”> <type>recently_viewed</type><limit>4</limit> </action> </block>…
require_once ( “../app/Mage.php” ); umask(0); //Mage::app(“default”); Mage::app(); $session = Mage::getSingleton(“customer/session”); if($session->isLoggedIn()){ var_dump($session->getData()); }
change <?php //echo $_order ?> To <?php echo $this->__($_order) ?>
<?php if(Mage::getSingleton(‘customer/session’)->isLoggedIn()): ?> <?php $this->setProduct(Mage::getModel(‘catalog/product’)->setStoreId(Mage::app()->getStore()->getId())->load($_product->getId()))?> INK<?php echo $this->getTierPriceHtml() ?>VK<?php echo Mage::helper(‘core’)->currency($_product->getFinalPrice());?> <?php else:…
<?php $_helpernew = Mage::helper(‘catalog/category’); $_subcategories = $_category->getChildrenCategories();?> <?php if (count($_subcategories) > 0): ?> <ul> <?php foreach($_subcategories as…
<script type=”text/javascript”> function setValue(){ document.co-shipping-method-form.s_method_freeshipping_freeshipping.checked=true; } window.onload = setValue(); </script>
Here is a code snippet for setting the ‘Continue Shopping’ location to the category listing page of the last product…