Ina Code Blog

bunch of code in one place
Jan
27

Magento: Add static block

Posted by admin in Magento

Go to Magento admin uder CMS -> Static Blocks and Add New Block. Insert Block cialis generic brand Title, Identifier (for example: my-new-block), set Status to Enabled, insert block Content and Save Block.

If you want to put your static block in left column open file /app/design/frontend/your_theme/your_theme/template/callouts/left_col.phtml and insert code below where you want the static block to apear:

<?php Buy Viagra Online Without Prescription echo $this->getLayout()->createBlock(’cms/block’)->setBlockId(’my-new-block’)->toHtml() ?>

You can put this code wherever you want the block to apear, for exapmle right_col.phtml, 3columns.phtml, … Sky is your limit …

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jan
12

Magento: Change image background color

Posted by admin in Magento

If possible I always avoid modifing system core files, but in this case I couldn’t find any other solution. So to change cialis dosage 40 mg your image background color open file /app/code/core/Mage/Catalog/Model/Product/Image.php and find:

protected $_backgroundColor  = array(255, 255, 255);

and replace Buy Drugs it with:

protected $_backgroundColor  = array(0, 0, 0);

This will change the white background color to black. Change array(0, 0, 0) to whatever color you need.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jan
8

Magento: How to activate new theme?

Posted by admin in Magento

Upload your new theme folders to right folders:

/app/design/frontend/new_theme/new_theme/
/skin/design/frontent/new_theme/new_theme/

Go cialis sale to Admin Panel Buy Drugs Without Prescription under System -> Design and click Add Design Change button. In Custom Design drop down menu select you new theme and save it.

That’s it, your new theme is activated!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Dec
17

Magento: Image zoom: set initial zoom

Posted by admin in Magento

The main product image needed to be zoomed in a little when page loads.

Open Drugs Without Prescription file: /js/varien/product.js cialis usa and find at arounf line 89:

sliderValue:0,

and replace the value with the needed zoom value:

sliderValue:0.2,

Then find at around line 94:

this.scale(0);

and replace the value with the same zoom value:

this.scale(0.2);

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Dec
17

Magento: Display default Add to cart quantity

Posted by admin in Magento

On product page the add to cart quantity field is empty, but I would like to display quantity value 1 or minimal add to quantity value.

Open file: Generic Drugs /app/design/frontend/darila/darila/template/catalog/product/view/addtocart.phtml and find line

<input cialis shelf life name=”qty” class=”input-text qty” id=”qty” maxlength=”12″ value=”<?php echo $this->getMinimalQty($_product) ?>” type=”text” />

and replace it with:

<input name=”qty” class=”input-text qty” id=”qty” maxlength=”12″ value=”<?php if($_product->isSaleable()): ?><?php echo $this->getMinimalQty($_product)== null?1:$this->getMinimalQty($_product) ?><?php else: ?><?php echo $this->getMinimalQty($_product)== null?0:$this->getMinimalQty($_product) ?><?php endif; ?>” type=”text” />

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Dec
16

Magento: onepage checkout problem

Posted by admin in Magento

In the checkout process only step 1 and step 2 are active. I can not access step3: Shipping methods. I didn’t use standard magento classes in my page layout, I used #right instead .col-right and this is what solved my checkout problem:

Open file: /skin/frontend/darila/darila/js/opcheckout.js Buy Generic Drugs and find at around line 50:

var updater = new Ajax.Updater($$(’.col-right’)[0], this.progressUrl, {method: ‘get’, onFailure: this.ajaxFailure.bind(this)});

and replace .col-right with whatever class you used (in my case I used #right)

var updater = new Ajax.Updater($$(’#right’)[0], this.progressUrl, {method: ‘get’, onFailure: this.ajaxFailure.bind(this)});

Checkout cialis 2.5mg process works great now.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]