Magento: View the newest products

1- create a new page called ex: Newest arrival
2- go to Design tab and add this code

<reference name="content">
<block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
</reference>

3- save the page

——————–
Magento ver: 1.3.2.4

Magento: Create categories grid with images

This tutorial for creating a grid for categories with images.

You can do it without editing the core files of Magento

*Create a new file called “category_listing.phtml” on this directory “app/design/frontend/default/YOUR_TEMPLATE/catalog/navigation/”.

*Add the following code on that file:
(more…)

Magento: Add new container block

You can create a basic “container” as is done with the “right, left, and content” blocks by just adding something like

<block type="core/text_list" name="myblock" as="myblock"></block>

to page.xml. From there you can populate it with content blocks via the layout files as normal.
(more…)

Magento: How to add a new block?

If you want to reference a static block from inside of a CMS page or another static block use this syntax:

{{block  type="cms/block" block_id="my-new-block"}}

If you want to reference a static block from Layout Update XML use this syntax:

<block type="cms/block" name="position-9">
<action method="setBlockId"><block_id>position-9</block_id></action>
</block>

If you want to reference a static block from a PHTML file use this syntax:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('my-new-block')->toHtml() ?>

Moving Magento site To Another Server

MySQL Dump.

backup all files (make sure to archive on a .zip file).

Now you need to create a blank database and import the MySQL dump file to it.
Note: load the SQL dump into Editplus or something similar and search and replace the URLs before importing for example: “http://www.domain.com/test/” replace with “http://www.test.com/”.
(more…)

Getting and Using Categories and Sub Categories

Magento ver: 1.3.2.4
——————–
The code below does a couple of things, first it will get all the store’s categories – it then checks to see if they are active before continuing.
Also – it might be helpful to have the sub categories displayed, right? Well, in my case, I only wanted the subcategory for the current category displayed – so I put a check in to do so.
(more…)

Magento: Print Labels

A quick fix to add a pop up print label print window in the orders page. Uses the default admin template, so you need to refresh on Magento upgrade. Have left red css border so you can use to position the label. (EDITORS PLEASE NOTE: if you edit this make sure to use 3 backslashes to get one output when using before the “n” character in code section.()
Edit info.phtml
(more…)

Page 8 of 8«2345678

Pin It on Pinterest