(1) app/code/local/Kodematix/Testing/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Kodematix_Testing>
<version>0.1.0</version>
</Kodematix_Testing>
...
Thursday, September 8, 2016
Monday, June 27, 2016
Magento 2 get new products collection on homepage
(1) Create A Block File in app/code/Companyname/NewProduct/Block/NewProduct.php
<?php
namespace Companyname\NewProduct\Block;
use Magento\Catalog\Api\CategoryRepositoryInterface;
use Magento\Catalog\Model\Category;
use Magento\Catalog\Block\Product\AbstractProduct;
use Magento\Catalog\Model\Product;
use...
Saturday, June 18, 2016
Magento 2 Getting product Image url
$imagehelper = $objectManager->create('Magento\Catalog\Helper\Image');
$image = $imagehelper->init($_product,'category_page_list')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400)->getUrl();
<img src="<?php echo $image; ?>">...
Change inventory on select configurable options
=> Please follow the below steps for the inventory options changes.
Step 1 : \app\design\frontend\rwd\default\template\catalog\product\view\type\options\configurable.phtml file in replace below code
<?php
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
$_jsonConfig...
Friday, December 4, 2015
Out of Stock Products Display in Custom list.phtml
Step 1:
Create New CMS Page in Below Content Add.
{{block type="catalog/product_outofstock" template="catalog/product/list.phtml" column_count="4"}}
Step 2 :
Create New PHP File Below Path.
Example :- app/code/local/Mage/Catalog/Block/Product/Outofstock.php
Step 3 :
OutofStock.php...
Saturday, September 19, 2015
Product price change programatically after add to cart in magento
Step 1: Create an Attribute for the products
Example :- Change Price Set its type yes/no for the
product
Step 2: Open File
code/core/mage/checkout/model/cart.php
Step 3: Goto on this function
public function save() { ...
Add Increase and Decrease Quantity Buttons in Magento
open addtocart.phtml
file replace this code
Path :- app\design\frontend\default\your theme\template\catalog\product\view\addtocart.phtml
<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle =
Mage::helper('core')->quoteEscape($this->__('Add to Cart')); ?>
<?php...