Magento remove currency selector on sidebar
Well i have a client which have no idea how the currency selector pops out on the magento sidebar,
well having a currency selector is pretty good for business, especially as a E-commerce site, however some might felt cheated because of the conversion rate could be wrong, and user pay lesser, that created the confusion to store owner and buyer.
here is a way to remove the selector from sidebar.
go and open app/design/frontend/yourtheme/yourtheme/layout/directory.xml
<reference name="left">
<block type="directory/currency" name="currency" before="catalog.leftnav" template="directory/currency.phtml"/>
</reference>
</catalog_category_default>
<!--
Category layered navigation layout
-->
<catalog_category_layered>
<reference name="left">
<block type="directory/currency" name="currency" before="catalog.leftnav" template="directory/currency.phtml"/>
</reference>
</catalog_category_layered>
remove these or comment it
css3 3d button
Well reading through a few Css3 tutorials these few days, and i came out with a very simple css button that looks like 3d.
well the concept here is very easy, have a div overlay each other, and the bottom layer just need to pull down abit so it can be seen which create the 3d feel.
As as you can see have a main div which is call “css33dbutton” to wrap the whole button. then we will create 2 divs/layers inside. The top layer “top-layer” will be displayed and you can write text inside, which i put “This is a button”.
Well now lets get into CSS,
Read Full Post →
Php error Warning: failed to open stream
well some time you try to work with some php scripts and we just had this yesterday when we transfer a script from different server to another, and this error pops up. …. failed to open stream…..
well here are some reasons for the errors.
These and similar errors are usually caused by:
- A missing or empty config.php file
- Missing or empty subdirectories
- Missing .php files
- An incorrect ‘txpath’ setting in config.php
Automatic invitation to google + / google plus
Anyone who wants an account at google+ entering this site and register.
is not cheating or anything, see the domain is https and plus.google.com
https://plus.google.com/_/notifications/ngemlink?path=%2F%3Fgpinv%3Da0i-66MEo6c%3AjtFN-YT4znc
Magento clear all orders.
While after you developed your magento in custom theme, did some test of oders, sign up new users etc, and now you want to live the project, but you don’t to see the previous test sales orders.
This is how we do it:
go to your phpmyadmin, and key in these snippets into mysql (this works for 1.5).
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_flat_order`;
TRUNCATE `sales_flat_order_address`;
TRUNCATE `sales_flat_order_grid`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sales_flat_order_status_history`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_order_payment`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `sales_flat_shipment`;
TRUNCATE `sales_flat_shipment_item`;
TRUNCATE `sales_flat_shipment_grid`;
TRUNCATE `sales_flat_invoice`;
TRUNCATE `sales_flat_invoice_grid`;
TRUNCATE `sales_flat_invoice_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_flat_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_status_history` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_grid` AUTO_INCREMENT=1;
ALTER TABLE `tag` AUTO_INCREMENT=1;
ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
-- lets reset customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
TRUNCATE `log_customer`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `log_customer` AUTO_INCREMENT=1;
ALTER TABLE `log_visitor` AUTO_INCREMENT=1;
ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;
-- Now, lets Reset all ID counters
TRUNCATE `eav_entity_store`;
ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
css easy ie hacks
Well just a day ago my website was hacked,i have to write this post again. ok lets begin.
well is a good practice calling different style in different Css stylesheet. And this is how it works:
if you want to target all IE versions
<link rel="stylesheet" type="text/css" href="all-ie.css" />
// or you can write your css directly in here.
< ![endif]-->
Targeting at IE7 only
<link rel="stylesheet" type="text/css" href="ie7.css" />
// or you can write your css directly in here.
< ![endif]-->
Targeting at IE6 only
<link rel="stylesheet" type="text/css" href="ie6.css" />
// or you can write your css directly in here.
< ![endif]-->
Mac OS X – Show Hidden Files in Finder
For those designer or web developers. who want to display hidden files such as .htaccess, especially those open source software such as magento, wordpress you can’t see them anywhere in the folder.
Showing hidden files:
and then enter this to refresh your finder.
Hide the files again:
killall Finder
Change number of column in magento category page.
Some time when you are doing a template design for magento.
and you will see that the default column on the category page is 3 column and you want to change to 4 or 5 columns in a easy way.
follow my step:
1) go to your magento \ app \ design \ frontend \ default \ YOURTHEME \ layout \ catalog.xml
if you are using default theme just go to your magento \ app \ design \ frontend \ base \ default \ layout \ catalog.xml
open this xml file and go to line84 under , you will see:
copy my code below and paste it under this line.
you will also need to paste it to line 120 under under this code:
Jquery reverse animation actions with slideToggle
While playing with jquery, and i have a div that slide up and down great when i click a button:
// make sure my click will slide down and click again will reverse back.
$(“.mydiv”).slideToggle(‘slow’);
});
However i want to add a css to the div only when i clicked
Read Full Post →
Magento Base url
For those who want to retrieve magento baseurl path, here is the snippet:
And those who want to say do something on home page or any page on magento, this is the code:
// do something...
}; ?>