On Magento category-pages you can select how to view the available products: By price, name or relevance, and ascending or descending. Within the Magento backend, the default ordering (price, name or relevance) can be configured but strangely enough the default direction (ascending or descending) not. Here is a XML layout update that allows you to Full Article…
Css – Meaning of numbers in col-md-4 , col-xs-1 , col-lg-2 in bootstrap
Meaning of numbers in col-md-4 , col-xs-1 , col-lg-2 in bootstrap Here's an attempt at a simple explanation: Ignoring the letters (xs, sm, md, lg) for now, I'll start with just the numbers… the numbers (1-12) represent a portion of the total width of any div all divs are divided into 12 columns so, col-*-6 spans 6 of 12 Full Article…
How to style checkbox using CSS?
You can achieve quite a cool custom checkbox effect by using the new abilities that come with the :after and :before pseudo classes. The advantage to this, is: You don't need to add anything more to the dom, just the standard checkbox. Note this will only work for compatible browsers, I believe this is related to the fact that Full Article…
Change the color of selected radio button’s center circle
You can bind radio-button to label, than you can hide radio-button and style label whatever you like.Example. div { background-color: #444444; display: flex-column; display:webkit-flex-column; } input { margin: 10px; position: absolute; left: 100px; } label { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; margin: 10px; display: block; width: 30px; height: 30px; border-radius: 50%; -webkit-border-radius: 50%; background-color: Full Article…
jQuery – Get & format HTML tags from a simple string
I have a String variable say strHTML = "<div class='abc'> This is a test <span class='xyz'> String </span> </div> " that i m receiving from server. When I use $('#container').append(strHTML); or $('#container').text(strHTML); it is displaying the whole string including HTML tag in "container". What i want is to take each HTML tag as HTML element Full Article…
Magento – How to redirect to previous page
Sometimes you will want to redirect to previous page after executing a function. You can try this: $this->_redirectReferer(); It does a little more than redirect to the previous page. If you specify in the url a parameter uenc it will consider that as the referrer.
No ‘Access-Control-Allow-Origin’ header is present on the requested resource
This topic will show you how to fix No ‘Access-Control-Allow-Origin’ header is present on the requested resource. No ‘Access-Control-Allow-Origin’ header is present on the requested resource This happens if you are attempting cross domain request.That is you are sending request from one domain to another domain. Normal browsers doesn’t support cross domain request for security Full Article…
Magento – Set custom title of the success page
If you want to change the title of the onepage success page. By default the text is "Magento Commerce", you can change it by following this way. Add this code in checkout.xml under checkout_onepage_success tag <reference name="head"> <action method="setData" translate="title"><key>title</key><value>your title </value></action> </reference>
Magento – Force secure urls (https) on all frontend pages.
This solution works in Mageno 1.9.1. You need to update the app/etc/config.xml file <?xml version=”1.0″?> <config> <frontend> <secure_url> <all>/</all> </secure_url> </frontend> </config> If user is using https, this should force all urls to rewrite (created as) to https.
Magento – DISPLAY CATEGORIES AND SUBCATEGORIES IN MAGENTO
Listing Categories in Magento 1.4.1.1 & Above Firstly, you need to make sure the block that you’re working is of the type catalog/navigation. If you’re editing catalog/navigation/left.phtml then you should be okay. In my previous example, we used the Category model to load in category information. This can be slow and often loads in more Full Article…