Magento: How to Create Shopping Cart Price Rule programmatically

Here is the code snippet by which we can create Magento shopping cart price rule, i.e the rule which is applied on shopping cart while customer add his/her product to shopping cart.

shopping cart price rule can be divided in 3 parts
1. Information of the rule
2. Condition that will be applied on the rule.
3. Action that will be taken.
(more…)

Continue ReadingMagento: How to Create Shopping Cart Price Rule programmatically

Joomla-JoomFish: How to fix Joom!Fish saving language configuration error, unknown column ‘l.ordering’ in ‘order clause’

When I go for language activation to the JoomFish language manager, I get this error when trying to activate default language:

An error occured while saving your languages

Also in the language configuration see the following error:

Unknown column 'l.ordering' in 'order clause' SQL=SELECT l.* FROM jos_languages AS l ORDER BY l.ordering
Warning: Invalid argument supplied for foreach() in www/administrator/components/com_joomfish/models/languages.php on line 188

(more…)

Continue ReadingJoomla-JoomFish: How to fix Joom!Fish saving language configuration error, unknown column ‘l.ordering’ in ‘order clause’

Magento: Replace Price Difference with Actual Price in Magento Configurable Product Options

This is performed by javascript. You need to modify the method getOptionLabel in js/varien/configurable.js (this is Magento 1.5.1.0, your milage may vary depending on the version you’re using).

This method receives the option and the price difference to be applied. If you want to just show the absolute price of the different options, you need to calculate them yourself, using the absolute base value of the configurable product and the absolute difference of the option.
(more…)

Continue ReadingMagento: Replace Price Difference with Actual Price in Magento Configurable Product Options

jQuery: Append a CSS class to any item or last item

<script type="text/javascript">
	jQuery("p:last").addClass(" last");
</script>

It’s important to note that this method does not replace a class. It simply adds the class, appending it to any which may already be assigned to the elements.

More than one class may be added at a time, separated by a space, to the set of matched elements, like so:

$("p").addClass("myClass yourClass");

(more…)

Continue ReadingjQuery: Append a CSS class to any item or last item

Magento: How to remove discount coupon code?

Magento offers a built in coupon code feature to provide shopping cart customers with discounts when shopping on their ecommerce website. You can post discount codes in emails, blogs and social networks to generate more traffic and entice paying customers to your ecommerce website. But often, website owners don’t want to offer discount codes on their shopping cart. Fortunately for ecommerce web designers, it is quite easy to disable the discount coupon code function on a Magento shopping cart website.
(more…)

Continue ReadingMagento: How to remove discount coupon code?

Magento: How to remove Estimate Shipping and Tax?

Magento offers a built in Estimate Shipping and Tax feature to provide shopping cart customers with realtime feedback of tax and shipping estimation when shopping on an ecommerce website. But often, website owners don’t want to display the Estimate Shipping and Tax function on their shopping cart website. For example, some shopping cart website owners will offer free shipping or flat rate shipping, which makes shipping estimation irrelevant, not to mention confusing and distracting to ecommerce customers. Fortunately for ecommerce web designers, it is quite easy to disable the Estimate Shipping and Tax function on a Magento shopping cart website.
(more…)

Continue ReadingMagento: How to remove Estimate Shipping and Tax?