Friday, March 2, 2012

magento : sql create new admin

magento :  sql create new admin
 
/* This is an example SQL script.
You should replace all the UPPERCASED variables.
The <USERNAME> variable can only be alphanumeric characters, 
and probably underscores (haven't tested)
 
You can either generate a password hash using the PHP code below,
or you can grab a password hash from the admin_user table from an
existing Magento install for which you know the admin password.
*/
 
/* Use the following PHP script to generate a salted password hash. 
You can also use a straight md5 hash, but it's much more easily brute-forced
<?php $password = 'PASSWORD'; $salt = 'GF'; echo $hash = md5($salt.$password).
':'.$salt; ?>
*/
 
insert into admin_user
select
(select max(user_id) + 1 from admin_user) user_id,
'FIRST NAME' first_name,
'LAST NAME' last_name,
'EMAIL' email,
'USERNAME' username,
'HASH EXAMPLE: 178f29c8e4c6c801db90cd171e3b2b53:in' password,  
/* You can replace this value with an md5 hash */
now() created,
NULL modified,
NULL logdate,
0 lognum,
0 reload_acl_flag,
1 is_active,
(select max(extra) from admin_user where extra is not null) extra;
 
insert into admin_role
select
(select max(role_id) + 1 from admin_role) role_id,
(select role_id from admin_role where role_name = 'Administrators') parent_id,
2 tree_level,
0 sort_order,
'U' role_type,
(select user_id from admin_user where username = 'USERNAME') user_id,
'USERNAME' role_name

Thursday, March 1, 2012

Magento : colour swatches

Magento : colour swatches

http://www.google.co.in/search?q=magento+%2B+list+page+image+zoom&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#hl=en&client=firefox-a&hs=jTo&rls=org.mozilla:en-US%3Aofficial&sclient=psy-ab&q=magento+%2B+colour+swatches+%2B+free&pbx=1&oq=magento+%2B+colour+swatches+%2B+free&aq=f&aqi=&aql=&gs_sm=3&gs_upl=1281876l1289233l0l1289730l22l20l0l0l0l0l2304l2304l9-1l1l0&gs_l=serp.3...1281876l1289233l0l1289730l22l20l0l0l0l0l2304l2304l9-1l1l0&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=e01d7cdb16f4b8e&biw=1024&bih=625

Magento : RSS (Category, New Products etc)

Magento : RSS (Category, New Products etc)

http://www.e-commercewebdesign.co.uk/blog/magento-tips/enable-magento-rss-feeds.php

Friday, February 24, 2012

Magento : Show Best Selling and Most Viewed Products

Magento : Show Best Selling and Most Viewed Products 

http://blog.magikcommerce.com/how-to-show-most-viewed-best-selling-products-in-magento-store/

Magento : Onepage Checkout – Add File Upload Field to any step

Magento : Onepage Checkout – Add File Upload Field to any step

http://www.excellencemagentoblog.com/onepage-checkout-add-file-upload-field-to-any-step

Magento : Reviews and ratings with stars

 Magento : Reviews and ratings with stars

Getting collection of all reviews for a product.
http://mandagreen.com/showing-all-reviews-and-ratings-on-a-page-in-magento/

Wednesday, February 22, 2012

Magento : Remove white space from top and bottom of Image

Magento : Remove white space from top and bottom of Image
Use keepFrame(false) just before resize and the images will show without white spaces at top and bottom.

Example:

<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->keepFrame(false)->resize(690).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />

Before:



After: