magik onsale installation & configuration · graphical labels to product images. labels can be...

7
Magik Onsale Installation & Configuration Magik Onsale extension allows you to attract customer's attention to any product by adding graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text are easily customized for each product. Admin can use a label image that comes with the extension or upload its own label image & text. Admin can not only write plain text for the label but also use the predefined variables as follows *DA* - discount amount *RP* - regular price *SP* - special price *SA* - save amount (RP-SP) *NL* - new line *ND* - life time in days *NH* - life time in hours *SK* - product SKU *ST* - in stock quantity Features: 1. Magik Onsale extension enables store owners to write promotional labels over their products with texts like "Save $10", "10% Off", “Hurry up! 3 Items left!”, “Only 3 days” – all variables are calculated for each product individually and automatically. 2. Saves your time when running e.g. seasonal discount campaigns, promoting new products or items with special price. 3. This extension supports six predefined label positions: top-left, top-center, top-right, bottom-left, bottom-center and bottom-right Installation Instructions: Step 1: Upload Magik onsale Extension at the correct path. You will find the path information along with the extension release. Step 2: Copy "onsale.png","onsale_product.png" image in your magento/media/ directory. Step 3: Add onsale.css in you theme's layout/page.xml as follows - <action method="addCss"><stylesheet>css/onsale.css</stylesheet></action>

Upload: others

Post on 14-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text

Magik Onsale – Installation & Configuration

Magik Onsale extension allows you to attract customer's attention to any product by adding

graphical labels to product images. Labels can be displayed on the Category page as well as

on the Product page. The label image and text are easily customized for each product. Admin

can use a label image that comes with the extension or upload its own label image & text.

Admin can not only write plain text for the label but also use the predefined variables as

follows –

*DA* - discount amount

*RP* - regular price

*SP* - special price

*SA* - save amount (RP-SP)

*NL* - new line

*ND* - life time in days

*NH* - life time in hours

*SK* - product SKU

*ST* - in stock quantity

Features:

1. Magik Onsale extension enables store owners to write promotional labels over their

products with texts like "Save $10", "10% Off", “Hurry up! 3 Items left!”, “Only 3 days” – all

variables are calculated for each product individually and automatically.

2. Saves your time when running e.g. seasonal discount campaigns, promoting new products

or items with special price.

3. This extension supports six predefined label positions:

top-left, top-center, top-right, bottom-left, bottom-center and bottom-right

Installation Instructions:

Step 1: Upload Magik onsale Extension at the correct path. You will find the path information

along with the extension release.

Step 2: Copy "onsale.png","onsale_product.png" image in your magento/media/ directory.

Step 3: Add onsale.css in you theme's layout/page.xml as follows -

<action method="addCss"><stylesheet>css/onsale.css</stylesheet></action>

Page 2: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text

Step 4: Add following code in the top of view.phtml & list.phtml

(magento/app/design/frontend/default/your_theme/catalog/product/)

<?php

$narr=Mage::getSingleton('onsale/onsale')->getnewproducts();

$sarr=Mage::getSingleton('onsale/onsale')->getsp();

$parr=Mage::getSingleton('onsale/onsale')->getindividualproduct();

$pcarr=Mage::getSingleton('onsale/onsale')->getindividualpc();

?>

Step 5: Add following code in the product view page.

( magento/app/design/frontend/default/your_theme/catalog/product/view.phtml )

just before the line - <?php echo $this->getChildHtml('media') ?>

<?php

$pid=$_product->getId();

if(array_key_exists($pid,$narr) || array_key_exists($pid,$sarr) || in_array($pid,$parr) ||

in_array($pid,$pcarr)) {

echo $this->getChildHtml('onsale');

} ?>

Need to add "onsale" block inside "product.info" block in catalog.xml as follows

<catalog_product_view translate="label">

.....

<reference name="content">

<block type="catalog/product_view" name="product.info"

template="catalog/product/view.phtml">

........

<block type="onsale/onsale" name="OS" as="onsale" template="onsale/onsale.phtml" />

</block>

</reference>

</catalog_product_view>

Step 6: Add following line of code in product listing page under (list & grid view).

( magento/app/design/frontend/default/your_theme/catalog/product/list.phtml )

Page 3: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text

<?php Mage::getSingleton('catalog/product')->setData("product", $_product->getId()); ?>

<?php

$pid=$_product->getId();

if(array_key_exists($pid,$narr) || array_key_exists($pid,$sarr) || in_array($pid,$parr) ||

in_array($pid,$pcarr)){

echo $this->getBlockHtml('OS1');

}?>

Add above code just before the product image tag.

Need to add "onsalecat" block inside "product_list" block in catalog.xml as follows

<catalog_category_layered translate="label">

<reference name="content">

<block type="catalog/category_view" name="category.products" template="catalog/category/

view.phtml">

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

......

<block type="onsale/onsale" name="OS1" as="onsalecat"

template="onsale/onsalecategory.phtml" />

</block>

</block>

</reference>

</catalog_category_layered>

After install you will see a new Tab “Onsale” in admin top menu bar. Under this you can find

global configuration settings & help-faq for on sale label display as follows –

General setting fields-

1. Display - Enable/disable the on sale label display

2. Position - set up the position of image label

3. Label Image – background image for the label

4. Text – Text to be displayed on in the image label

Page 4: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text

Help & Faq -

Page 5: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text
Page 6: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text

Admin can set up the onsale label for individual product from product add/edit page as

follows-

Once Extension is installed in admin >catalog > manage products

On add/edit product page 2 new tabs will be added in left navigation menu -

1. Product Label – If this is set for any product it will override all global settings.

2. Category Label - If this is set for any product it will override all global settings.

Page 7: Magik Onsale Installation & Configuration · graphical labels to product images. Labels can be displayed on the Category page as well as on the Product page. The label image and text

On Front end user can see the onsale labels as –

Category listing page –

Product Page –