Making your lover your number one priority
Nurturing a successful romantic relationship or marriage means finding time to spend with your significant other, but in todayâs busy world it can be difficult to balance a hectic career and other obligations with your responsibilities as a romantic partner. Sure, you may think that youâre spending enough time with your lover and that they know that your romance is the most important thing in your life. But are you certain of that?
Reiterating to your sweetheart that your romantic relationship is your number one priorityâ"even more important than your career or other obligations that might keep you awayâ"could be one of the romantic ideas that you need to take to build a better romance. Many of us take for granted that our lover knows that they are our ânumber one,â but sharing a romantic partner with a busy career or hectic schedule can sometimes make a person feel second best.
You might make a point to romantically hug your lover as soon as you get home from work or to spend as much free time with them on the weekends, but simply telling them that they are the most important priority in your life is just as important.
How you tell them is up to you. Whether itâs with words, in a card or romantic note, or with a romantic text message, letting your lover know that they are the most important thing in your life will work wonders for your loving relationship.
Your career or other important duties may keep you away from your lover more than you would like, and your romantic partner probably knows that you have certain obligations that your have to fulfill in order to be a good parent, role model or spouse. But when is the last time you told your lover that they are much more important to you than anything else in the world?
Itâs a simple thing to say, but youâll be amazed at how much more fulfilling your romantic relationship will be if you tell your boyfriend, girlfriend, wife or husband that theyâre your number one priority. Let them know . . . today!
Write a romantic list to add amazing romance to your relationship
One of the many great things about coming up with romantic ideas in a loving relationship or marriage is that itâs a lot like depositing a bunch of money into a savings account. Just as your money pays you interest in the bank without any effort on your part, the romantic memories that you and your lover make together will pay you back for the rest of your lives. And if youâre following the daily romance advice we post here, youâre definitely depositing a lot of romantic capital into your loving relationshipâs joint account!
But in spite of the fact that you and your lover made those wonderful memories together, are you certain that your significant other knows which of your many romantic memories are the most special to you? Those loving experiences may hold a special place in your heart, but romantic moments arenât meant to be buried away and never mentioned again. Are you building up interest on your romantic memories but not collecting any of the profits?
Well do something about it today! Iâll let you in on one very simple, very effective way to show your lover just how much they mean to you and how special those memories are to you. Itâs as easy as this: sit down with a pen and paper, write out a list from one to ten, and fill in your favorite romantic experiences you and your lover have had together.
Sounds simple? Of course it is! The most effective ways of adding romance to your life always are. And writing out a list of your favorite romantic memories will do not one, but two things to improve your romantic relationship. One: it will help remind you of the many wonderful, satisfying, romantic experiences youâve had with your lover. Even the most successful romantic relationships experience lulls, and we all need a reminder every once in a while of the great reasons why we fell in love with our sweetheart.
And two: making a list of your favorite romantic memories will be a wonderful surprise for your husband, wife, boyfriend or girlfriend, too! When you share your list, you and your partner will have a terrific time reliving those memories and being reminded of even more romantic experiences youâve had together.
And who knows . . . it might even inspire your lover to make out a romantic list of their own! So go grab a pen and paper and start making out your list of your favorite romantic memories right now. Your lover, and your romantic relationship, will thank you for it!
Sending romantic text messages to say âI Love Youâ cell phone
In the days before cell phones and LCD screens, lovers professed their romantic feelings for each other by dipping quills in ink and penning poetic love letters accented by elaborate script and even the occasional teardrop stain. The most prolific romanticsâ"like the fictional, lovesick Cyrano de Bergeracâ"spent long hours coming up with romantic ideas and authoring flowery testaments to their objects of affection before sealing parchment with rose-colored wax and sending the correspondence off with a courier as quickly as one could be found.
Old-fashioned romantic love notes . . . with a modern twist!
Whether by horseback, secret delivery in the dark of night, or even tied to the leg of a pigeon, the romantic love letters of long ago overcame obstacles of distance and oppression to reach their objects of affection. While hand-written messages of love are still a necessary and important part of healthy romantic relationships or marriages today, the contemporary romantic no longer needs to order a fresh bottle of ink or keep a courier on hand to deliver sporadic thoughts of love that innevitably pop up during the course of the day.
Some may complain that modern technology has made romance too cheap and easy, but digital innovation, if used sparingly, can help build a better, more romantic relationship with your boyfriend, girlfriend, wife or husband.
Most people today have cell phones, but Iâve met far too many who are hesitant to try text messaging or who think they would have no use for it. Expecially in a romantic relationship, texting can provide an important, unique forum for you and your lover to communicate in a fun new way.
Skip the small talk . . . and get right to romance!
Instead of making a romantic relationship less personal, text messaging can actually increase the amount of communication by allowing couples to express feelings that they wouldnât otherwise. If, for example, you have a sudden thought at work of a romantic moment you shared recently with your lover, in many cases you wonât have the time or the privacy to call and talk about it. But text messaging allows you to send a very brief, very private message to your lover without anyone around you having a clue.
In addition, text messaging lets us send little romantic sentiments to our lovers without having to surround our message with the empty small talk and uncomfortable pauses that might come with a phone call. Just a few short romantic words are all that are necessary in a text . . . but we would never dream of calling our lover, saying those same few words, then hanging up right away!
Put thought into what you send . . . but donât overdo it!
So, what kind of romantic text messages should you send to your lover? Thatâs up to you. You could decide to send a snippet from a romantic poem or a flowery message every day, but often all thatâs necessary is a simply âI love youâ or âIâm thinking about you.â Even short, sporadic messages like that will show your lover that they are on your mind and help improve your relationship.
One thing to keep in mind, though: it is possible to overdo text messaging. Because itâs so easy to do, it can be tempting to send text after text during boring lulls in your day. Donât give in to this urge; it can be expensive if youâre paying a few cents per text, and no matter how much in love someone is they can still get annoyed by too much romance. Try to limit yourself to a few romantic texts a day, and youâll be amazed at the positive difference it makes in your relationship.
So what are you waiting for? Go plug in to a great new way of using technology to add more romance to your relationship today. Get texting!
When to say I love you
For the truly romantic person, thinking of romantic ideas for saying âI love youâ in fresh and unique ways is never a problem; there are a million different ways to show your lover how you feel about them, and every day offers new opportunities to inject romance into your life. But exactly when to say I love you, and deciding which moment is the best to express your feelings to your lover, can be a bit more difficult to decide on. Is there really a perfect time to say âI love you,â and if so, when is it?
If there is such a thing as the perfect time of day to let your girlfriend, wife, boyfriend or husband know how you feel, itâs probably different for every romantic relationship or marriage. Romance is a very personal experience, and each loving relationship is as unique as an individual set of fingerprints or a single snowflake. The exact experiences, memories, feelings and circumstances present in your relationship canât be found in any other. So while saying âI love youâ as you come home from work might be best in one relationship, saying it as you lay down to bed might be best in another.
But regardless of when you feel the most comfortable saying âI love you,â you should never, ever stop saying it at other times. Love is a renewable resource, and youâll never run out of âI love youâsâ if you say them too much. Who cares if you already told your sweetheart you loved them that morning? That shouldnât stop you from telling them again that afternoon and that evening.
Donât limit yourself to expressing your loving feelings only a certain amount of times during a day; instead, tell your lover how you feel whenever the fancy strikes you. Sure, if you started saying âI love youâ three thousand times a day, that might cause a strain on even the strongest relationship. But if you have a healthy, open relationship, expressing your love three times or even ten times a day should only strengthen it.
Hereâs one bit of advice to add some variety to your relationship, though: try saying âI love youâ at times when itâs unexpected, rather than when youâve always said it in the past. If your partner is only used to hearing you express your love when you leave for work in the morning, call to tell them again when you get to work. If theyâre used to hearing âI love youâ as you lay down for bed at night, tell them how you feel as soon as you open your eyes in the morning.
Is there a perfect time to say âI love you?â The answer is yes, but the only person who can decide when that is for your relationship is you. But by promising yourself not to limit yourself in how often you express your feelings, and by doing it at unexpected moments, you can that each âI love youâ will be as close to perfect as possible!
How to say âIâm proud of youâ
What if I told you there are four words that are almost as important to a romantic relationship or marriage as âI love you,â but that are rarely said? Itâs true, and these four words, if said even sporadically, can do wonders for letting your lover know your feelings, inspiring new romantic ideas, and building a better, more loving relationship.
Now that Iâve grabbed your attention, get your red pen ready: âIâm proud of youâ are the four magical words that will add a whole new dimension of love and appreciation to your romantic relationship.
So, why is the phrase âIâm proud of youâ nearly as important in a relationship as âI love you?â Well, regular readers of Romance Tracker already know that showing someone you love them is just as important as saying you love them. Sure, A simple âI love youâ is a wonderful, effective way to nurture your loving relationship. But actually letting your lover know why you have these wonderful sentiments about them will help them appreciate your feelings and feel better about themselves.
âIâm proud of youâ is a phrase more often heard from the mouths of parents or mentors, but it is very important in romantic relationships, as well. There arenât many better ways to show your boyfriend, girlfriend, wife or husband that you approve of the way they conduct themselves and the wonderful things they do than by telling them youâre proud of them.
There are a variety of reasons why we might be proud of our romantic partner: the hard work they do at the office or at home to help support the family; the time and effort they put into being a good role model for the children; or even something as simple as kindness they might show to you or a stranger.
The fact is that you can find dozens of simple reasons to be proud of your lover every day, and you shouldnât pass up the chance to express your pride . . . whether itâs with the spoken word, a quick text message, or in a special, hand-written note.
So what are you waiting for? âIâm proud of youâ are four magical words that are guaranteed to add more romance to your relationship and make your lover feel great. Go let that special someone know why youâre so proud to have them in your life!
Top 10 ways to stop a breakup or divorce and save your relationship
Posting about romantic ideas every day here on Romance Tracker is a pretty easy thing to do, but actually adding more romance to your relationship or marriage and making it more fulfilling for your and your sweetheart can be difficult if youâve hit a rough patch. If youâre having problems in your romantic relationship and want to avoid a breakup or learn how to save your marriage, the best ways to refresh your love life and bring back excitement arenât always easy to discover.
Every relationship faces its own unique challenges and difficulties, and the solutions to your romantic problems can be just as unique. Loss of romantic interest, not having enough in common, family difficulties, even unfaithfulness or suspected cheating . . . any can spell trouble for a relationship, but none have to mean the end of your romance.
Remember, relationship problems are inevitable for any romantic couple, but if you face them as a determined team, they can actually make your love even stronger. With optimism, patience, and understanding, you can turn any problem into an experience that will help you and your boyfriend, girlfriend, wife or husband fall even deeper in love.
And while youâre the only person who can discover the best ways to save your struggling relationship, there are many foolproof, effective and simple methods you can use to add more love to the mix and make yourself more likely to succeed and stop a divorce or breakup. Ten of the easiest ways to stop your relationship from breaking up are listed below . . . but donât stop with them!
Top Ten Ways to Save Your Relationship
1. Make your sweetheart your number one priority
We all have responsibilities in our lives that take us away from our families and lovers, and fulfilling those responsibilities is part of being a good partner and a romantic person. But even if you canât spend as much time with your sweetheart as you would like, there are lots of ways to make it clear to them that they are still the number-one priority in your life.
2. Learn about your sweetheartâs interests
We all bring unique interests, hobbies and talents to a relationship, and learning about your loverâs tastes and skills is a great way to appreciate them more and share rewarding time together. Learning from each other and experiencing new things as a couple will bring you closer together, make your relationship more exciting and expand your horizons.
3. Brag about your relationship
No one likes a loudmouth who never shuts up about their love life, but telling your friends, family and coworkers about how much you love your romantic relationship is a great way to make your sweetheart feel appreciated and make you excited about your romance. Making it a habit to tastefully mention how thankful you are to have your lover will only make your relationship stronger.
4. Say âIâm proud of youâ to your sweetheart
Everyone likes to feel that they are appreciated, and telling your lover that you are proud of them is one of the simplest . . . and least used . . . ways to make them feel good about themselves and your romantic relationship. Whether youâre telling them how much you appreciate the job they do, their role in your relationship, or their sacrifices, âIâm proud of youâ are four of the most effective words you can use to save your romance.
5. Lead by example
Keeping score of whoâs more romantic in your relationship is one of the worstways to promote romance in your relationship. Just as members of any successful team have learned, the best way to encourage a certain kind of behavior in others is to lead by example. So be more romantic with your lover, but donât insist they do the same. With enough encouragement, you may be surprised to see them start to come around themselves.
6. Call in sick to work to spend time with your sweetheart
Iâm not saying you should try to get fired from your job, but if youâre doing well at work there is nothing wrong with taking a tiny holiday to spend time with the most important person in your life. Briefly putting off other responsibilities to be with your lover is a great way to show them that they are the number one priority in your world.
7. Introduce some competition into your relationship
No, I donât mean to make your sweetheart jealous by dating another person. But a little good-natured romantic competitionâ"whether itâs through competitive games, contests, sports, or betsâ"can be a terrific way to add a little excitement, interaction, and playfulness into your relationship.
8. Compliment your sweetheart every now and then
Sure, itâs easy to overdo compliments and come across as over-the-top or insincere. But regardless of whether or not your lover knows how you feel about them, a simple, kind compliment once in a while goes a long way in making them feel good about themselves and your relationship.
9. Get over your fear of coming across as too âclingyâ
Thereâs a big difference between being tastefully romantic with your sweetheart and being âclingy.â Hand-holding, simple kisses on the cheek and other subtle acts of love are nothing to be ashamed of. It shows your lover that you arenât embarrassed of your romance and will add a much-needed dimension to your relationship.
10. Learn to love yourself
Part of the reason why some people have a difficult time appreciating romantic gestures is that they donât understand why their lover is so fond of them. Learning to appreciate your own talents, gifts and innate goodness will help you appreciate your sweetheartâs feelings and let you accentuate your best qualities. Ultimately, learning to love yourself will teach you how to love your romantic partner more.
Why romantic emails are a great way to say âI love youâ
One recurring theme here on Romance Tracker is using modern technology to add old-fashioned romance to your relationship. In spite of all that the modern world has done to make human relationships more impersonal, there are still many great romantic ideas for using technology to add more spontaneity, fun and excitement to yours.
True romance is really about taking things slowly and paying close attention to even the small details, and the Internet and email are about doing things as quickly and simply as possible . . . but used correctly, they can help nurture and build your relationship. After all, youâve used the internet to find this post about making your relationship or marriage more romantic, havenât you?
Much like sending romantic text messages, a spontaneous romantic email is a simple and effective way to tell your wife, girlfriend, husband or boyfriend you are thinking about them at any time of the day. Many of us have gotten sick and tired of seeing our inboxes full of forwarded emails and unoriginal jokes, but an original, romantic email isnât spam at all. And it doesnât take much time or effort; something as simple as âIâm busy with work right now, but Iâm missing you!â can make your sweetheart smile for the rest of the day!
If you want to get a bit more romantic, why not do some research and send your significant other a single line from a romantic poem every day? Or maybe a beautiful, romantic image youâve found on the web with a note telling your lover how it reminded you of them?
E-cards are another great way to send lighthearted or serious romantic messages to your sweetheart over the Internet. There are plenty of on-line companies that let you send an ecard for free (just Google âe-cardsâ), and you can usually personalize them with your own special message. E-cards are a quick, fun way for your to tell your lover youâre thinking about them, and theyâre guaranteed to put anyone who gets one into a great mood!
So what are you waiting for? Youâre on the Internet right now, so nothingâs stopping you from sending your lover a quick romantic email. Promise yourself to use the Internet to tell that special someone youâre thinking about them at least once a week, and I guarantee your relationship will be better for it!
Girls,Hot girls,Girls showering,Girls gone wild,Girl,Girls in gym shower,Girls making out,Russian 12 to 16 girls,Beautiful Pakistani girls,Little girls gallery,Best Free image site ever.Feel free to Download.Updating Daily.
Friday, May 14, 2010
Everything you need to learn about Magento Open Source and Beginners guide to manage Magento Demo Store
at
7:10 PM
Hello friends
Today i am providing a Magento help file on a special request of my Developer friend Mr. Vinayak Jee.
This file is very useful and each line written in this file is written by me manually. So if you find any problem in any line of code written below please feel free to ask me by posting a comment. I will reply very soon.
Every question and their answers can be found and solved here about Megento.
Install a fresh copy of magento theme
Login to magento admin
http://vaseem/IEC/magento/index.php/admin/
go to System-> Theme, select current theme, delete it in next window,
1) Delete the content of the folder /var
2) Change the values of the file /app/etc/local.xml
There you can find your connection string data (database user, host and name) and table prefix.
3) Once you got your database uploaded, you need to make some changes.
- Run this query:
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
------------------------------------------
How to Reset admin password in magento
You need to go into PHPMyAdmin and connect to your Magento database on your server.
UPDATE admin_user SET password=MD5('pass') WHERE username='admin';
------------------------------------------
Customizing magento template
http://www.themeswiki.org/Customizing_Magento
admin panel
http://localhost/magento/index.php/admin
run magento from local to online
http://www.magentocommerce.com/boards/viewthread/27272/
------------------------------------------
path of magento config file
E:WampwwwmagentoappcodecoreMageInstallModelInstaller
------------------------------------------
add front footer and meta and keyword
1. Open the Magento admin panel
2. Select the "System" tab
3. Click the "Configuration" menu item
4. Select the "Design" menu item
5. Click the "Footer" tab. Here you can change the copyright notification
6. With that done, click the "Save Configure" button.
------------------------------------------
send mails to admin after product sale and invoice and more mails here
Log in into admin area, System->Configuration menu. Scroll down to Sales section and click on the Sales Emails and select the first section Orders. Enter your admin e-mail in the field “Send Order Email Copy To”.
Sending an email to notify admin where there's a new review posted
Admin Review Notification
http://www.magentocommerce.com/extension/1869/admin-review-notification
------------------------------------------
get product name and id on templatecatalogproductlist.phtml page
echo $Product_Name = $this->htmlEscape($_product->getName());
$Product_Id = $this->getAddToCartUrl($_product);
how i used
<?php $Product_Name = $this->htmlEscape($_product->getName());
$Product_Id = $this->getAddToCartUrl($_product);
$Product_Id = strstr($Product_Id,'product');
$Pro_arr = explode("product", $Product_Id);
$Product_Id = str_replace("/","",$Pro_arr[1]);
$Product = $Product_Id .'-'. $Product_Name; // getting product name and id
?>
<div class="out-of-stock"><a href="<?php echo $this->getUrl() ?>send_query?<?=$Product;?>"><?php echo $this->__('Send Query') ?></a></div>
------------------------------------------
delete all categories before uplaoding your demo website to online category table
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
insert into `catalog_category_entity`(`entity_id`,`entity_type_id`,`attribute_set_id`,`parent_id`,`created_at`,`updated_at`,`path`,`position`,`level`,`children_count`) values (1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),(2,3,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
insert into `catalog_category_entity_int`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) values (1,3,32,0,2,1),(2,3,32,1,2,1);
insert into `catalog_category_entity_varchar`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) values (1,3,31,0,1,'Root Catalog'),(2,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),(5,3,33,0,2,'default-category');
------------------------------------------
export categories with id in csv file
create a file and save it in tempalte folder /catalog/allcategories.phtml
<?
$category = Mage::getModel ( 'catalog/category' );
$tree = $category->getTreeModel ();
$tree->load ();
$ids = $tree->getCollection ()->getAllIds ();
if ($ids) {
$fp = fopen('var/import/catwithid.csv', 'a');
fwrite($fp, 'catId, catNamen');
foreach ( $ids as $id ) {
$string = $id . ', ' .$category->load($id)->getName() . 'n';
fwrite($fp, $string);
}
fclose($fp);
}
?>
in admin manage pages - create new page
Export-Categories
and run it like this
http://indianexportcenter.com/Export-Categories
{{block type="core/template" template="catalog/allcategories.phtml"}}
it will run the file and save a file here var/import/catwithid.csv this file must exist there.
------------------------------------------
magento db database and tables
cataloginventory_stock_status it have stock quantity field which must be more than zero to make send query work
`catalogsearch_fulltext` saves meta tag and meta desc of products
`catalog_product_entity_varchar` saves product name and other info
------------------------------------------
manage pages in admin saves in `cms_page` table
so you can upload this table to online for changing manage pages same as local
category comes from table `catalog_category_entity_varchar`
------------------------------------------
mails from magento
all mails in admin can be set here System -> Configuration -> Store Email Addresses
mail to user after account creation
after newsletter subscribe
------------------------------------------
recover admin password reset
UPDATE `admin_user` SET `password`=MD5('pass') WHERE `username`='admin';
------------------------------------------
set title of pages in frontend of magento store
open page.xml and write this line at line no 60
<action method="setTitle" translate="title"><title>Indian Export Center Store for All People's need</title></action>
------------------------------------------
create module with mysql query or db integration custom table
http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table
------------------------------------------
simple contact form module custom with mail sending and notification
1. appetcmodulesVaseem_SimpleContact.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_SimpleContact>
<active>true</active>
<codePool>local</codePool>
</Vaseem_SimpleContact>
</modules>
</config>
2. appcodelocalVaseemSimpleContactetcconfig.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_SimpleContact>
<version>0.1.0</version>
</Vaseem_SimpleContact>
</modules>
<frontend>
<routers>
<JustSomeFreeRouterNameHereNo1>
<use>standard</use>
<args>
<module>Vaseem_SimpleContact</module>
<!--front end will be accessed like this http://vaseem/IEC/magento/index.php/vaseem-simplecontact/ -->
<frontName>vaseem-simplecontact</frontName>
</args>
</JustSomeFreeRouterNameHereNo1>
</routers>
</frontend>
</config>
appcodelocalVaseemSimpleContactcontrollersIndexController.php
<?php
class Vaseem_SimpleContact_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
//Get current layout state
$this->loadLayout();
$block = $this->getLayout()->createBlock(
'Mage_Core_Block_Template',
'vaseem.simple_contact',
array(
'template' => 'vaseem/simple_contact.phtml'
)
);
$this->getLayout()->getBlock('content')->append($block);
//$this->getLayout()->getBlock('right')->insert($block, 'catalog.compare.sidebar', true);
$this->_initLayoutMessages('core/session');
$this->renderLayout();
}
public function sendemailAction()
{
//Fetch submited params
$params = $this->getRequest()->getParams();
$mail = new Zend_Mail();
$mail->setBodyText($params['comment']);
$mail->setFrom($params['email'], $params['name']);
$mail->addTo('somebody_else@example.com', 'Some Recipient');
$mail->setSubject('Test Vaseem_SimpleContact Module for Magento');
try {
$mail->send();
}
catch(Exception $ex) {
Mage::getSingleton('core/session')->addError('Unable to send email. Sample of a custom notification error from Vaseem_SimpleContact.');
}
//Redirect back to index action of (this) vaseem-simplecontact controller
$this->_redirect('vaseem-simplecontact/');
// after mail send this page comes so this name must be same as frontName in config.xml of etc folder
}
}
?>
3. appdesignfrontenddefaultiectemplatevaseemsimple_contact.phtml
<div class="box simple_contact">
<form id="simple_contact_form" name="simple_contact_form" action="<?php echo $this->getUrl('vaseem-simplecontact/') ?>index/sendemail" method="post">
<fieldset class="group-select">
<h4 class="legend">Vaseem_SimpleContact module sample</h4>
<ul>
<li>
<div class="input-box">
<label for="name">Gimme your name <span class="required">*</span></label><br />
<input name="name" id="name" title="Name" value="" class="required-entry input-text" type="text" />
</div>
<div class="input-box">
<label for="email">And your email <span class="required">*</span></label><br />
<input name="email" id="email" title="Email" value="" class="required-entry input-text validate-email" type="text" />
</div>
<div class="clear"></div>
<div class="input-box">
<label for="comment">Some comment?</label><br />
<textarea name="comment" id="comment" title="Comment" class="required-entry input-text" style="height:100px;" cols="50" rows="3"></textarea>
</div>
</li>
</ul>
</fieldset>
<div class="button-set">
<p class="required">* Required Fields</p>
<button class="form-button" type="submit"><span>Submit</span></button>
</div>
</form>
</div>
4. run like this http://vaseem/IEC/magento/index.php/vaseem-simplecontact/
------------------------------------------
custom hello world module in magento and call that phtml page directly in url
this module is using IndexController.php method
1. create xml file at
appetcmodulesVaseem_Example.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_Example>
<active>true</active>
<codePool>local</codePool>
</Vaseem_Example>
</modules>
</config>
2. create folder case sensitive like this
appcodelocalVaseemExamplecontrollers
appcodelocalVaseemExampleBlock
appcodelocalVaseemExampleetc
now create files here appcodelocalVaseemExamplecontrollersIndexController.php
<?
class Vaseem_Example_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout(array('default'));
$this->renderLayout();
}
}
?>
appcodelocalVaseemExampleBlockExample.php
<?
class Vaseem_Example_Block_Example extends Mage_Core_Block_Template
{
// necessary methods
}
?>
appcodelocalVaseemExampleetcconfig.xml
<?xml version="1.0"?>
<config>
<global>
<modules>
<vaseem_example>
<version>0.1.0</version>
</vaseem_example>
</modules>
<blocks>
<example>
<rewrite>
<example>Vaseem_Example_Block_Example</example>
</rewrite>
</example>
</blocks>
</global>
<frontend>
<routers>
<example>
<use>standard</use>
<args>
<module>Vaseem_Example</module>
<frontName>example</frontName>
</args>
</example>
</routers>
<layout>
<updates>
<example>
<file>example.xml</file>
</example>
</updates>
</layout>
</frontend>
</config>
3. Define Frontend Template : xml file in layout folder
go theme folder appdesignfrontenddefaultieclayoutexample.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<example_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block type="example/example" name="hello" template="example/example.phtml"/>
</reference>
</example_index_index>
</layout>
4. Create template file appdesignfrontenddefaultiectemplateexampleexample.phtml
Hello World ! I am a Magento Guy Vaseem Ansari..
Hey, new module is ready to run and hit browser with url <br />
http://localhost/project_name/index.php/example/
<br />
and see result. Is it easy or not ? what you think ?
5. run the file http://vaseem/IEC/magento/index.php/example/
------------------------------------------
custom hello world module in magento and call it in admin
1. create xml file at
appetcmodulesVaseem_All.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_Example> <!-- MyCompany is folder in appcodelocalMyCompany and Vaseem is folder in MyCompany-->
<!-- this is an active module -->
<active>true</active>
<!-- this module will be located in app/code/local code pool -->
<codePool>local</codePool>
</Vaseem_Example>
</modules>
</config>
2. create folder case sensitive like this
appcodelocalVaseemExampleetc
appcodelocalVaseemExampleBlock
now create file here appcodelocalVaseemExampleetcconfig.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_Example>
<version>0.1.0</version>
</Vaseem_Example>
</modules>
<global>
<blocks>
<vaseem_example>
<class>Vaseem_Example_Block</class>
</vaseem_example>
</blocks>
</global>
</config>
now create file here appcodelocalVaseemExampleBlockView.php
<?php
/**
* Example View block
*
* @codepool Local
* @category Vaseem
* @package Vaseem_Example
* @module Example
*/
class Vaseem_Example_Block_View extends Mage_Core_Block_Template
{
private $message;
private $att;
protected function createMessage($msg) {
$this->message = $msg;
}
public function receiveMessage() {
if($this->message != '') {
return $this->message;
} else {
$this->createMessage('Hello Vaseem');
return $this->message;
}
}
protected function _toHtml() {
$html = parent::_toHtml();
if($this->att = $this->getMyCustom() && $this->getMyCustom() != '') {
$html .= '<br />'.$this->att;
} else {
$html .= '<br />No Custom Attribute Found';
}
return $html;
}
}
3. go theme folder appdesignfrontenddefaultiectemplate
create folder exampleview.phtml
<?php
/**
* Fido view template
*
* @see Fido_Example_Block_View
*
*/
?>
<div>
<span><strong>This is the output of the Vaseem example:</strong></span><br />
<span style="color:#FF9933;">
<?php
echo $this->receiveMessage();
?>
</span>
</div>
4. in admin manage pages -> home page
call your view.phtml file like this
{{block type="vaseem_example/view" my_custom="Test" template="example/view.phtml" }}
or
call in xml file
<reference name="right">
<block type="fido_example/view" my_custom="Test" template="example/view.phtml" />
</reference>
//this will add your block in the right column
------------------------------------------
show product quantity with add to cart button
show product available quantity in store
use this
<?= (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()?>
i used in calatog/product/list.phtml
------------------------------------------
delete all products in magento
TRUNCATE TABLE `catalog_product_entity`;
or to completely remove all use this
TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;
TRUNCATE TABLE `catalog_product_entity_int`;
TRUNCATE TABLE `catalog_product_entity_media_gallery`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`;
TRUNCATE TABLE `catalog_product_entity_text`;
TRUNCATE TABLE `catalog_product_entity_tier_price`;
TRUNCATE TABLE `catalog_product_entity_varchar`;
TRUNCATE TABLE `catalog_product_link`;
TRUNCATE TABLE `catalog_product_link_attribute`;
TRUNCATE TABLE `catalog_product_link_attribute_decimal`;
TRUNCATE TABLE `catalog_product_link_attribute_int`;
TRUNCATE TABLE `catalog_product_link_attribute_varchar`;
TRUNCATE TABLE `catalog_product_link_type`;
TRUNCATE TABLE `catalog_product_option`;
TRUNCATE TABLE `catalog_product_option_price`;
TRUNCATE TABLE `catalog_product_option_title`;
TRUNCATE TABLE `catalog_product_option_type_price`;
TRUNCATE TABLE `catalog_product_option_type_title`;
TRUNCATE TABLE `catalog_product_option_type_value`;
TRUNCATE TABLE `catalog_product_super_attribute`;
TRUNCATE TABLE `catalog_product_super_attribute_label`;
TRUNCATE TABLE `catalog_product_super_attribute_pricing`;
TRUNCATE TABLE `catalog_product_super_link`;
TRUNCATE TABLE `catalog_product_enabled_index`;
TRUNCATE TABLE `catalog_product_website`;
TRUNCATE TABLE `catalog_product_entity`;
TRUNCATE TABLE `cataloginventory_stock`;
TRUNCATE TABLE `cataloginventory_stock_item`;
TRUNCATE TABLE `cataloginventory_stock_status`;
insert into `catalog_product_link_type`(`link_type_id`,`code`) values (1,'relation'),(2,'bundle'),(3,'super'),(4,'up_sell'),(5,'cross_sell');
insert into `catalog_product_link_attribute`(`product_link_attribute_id`,`link_type_id`,`product_link_attribute_code`,`data_type`) values (1,2,'qty','decimal'),(2,1,'position','int'),(3,4,'position','int'),(4,5,'position','int'),(6,1,'qty','decimal'),(7,3,'position','int'),(8,3,'qty','decimal');
insert into `cataloginventory_stock`(`stock_id`,`stock_name`) values (1,'Default');
------------------------------------------
display new products on magento home page
type this in admin home page
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
------------------------------------------
how to delete test orders before launch of magento store
admin-> sales-> you find nothing so u need to run manual query in db
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_order`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
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_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_varchar` 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 `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` 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;
-- 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;
-- Reset all ID counters
TRUNCATE `eav_entity_store`;
ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
u are done now
------------------------------------------
send emails on users shopping
email templates reside in this folder
applocaleen_UStemplateemail
so if u wanna make changes in these tempaltes dont make change at above location just copy them at this folder
appdesignfrontenddefaultieclocaleen_UStemplateemail
and now u can make changes in them
calling emails address in email tempaltes dynamically
if u write this sales@{{var customer.store.name}}.com instead of dummyemail@magentocommerce.com in e mail templates it will work.
override email tempaltes
http://yviktorov.github.com/magento/2009/05/23/override-email-templates.html
when user buy some product he get mails
so we can just change the template of those e mails by doing this
those e mail tempaltes are in this folder
applocaleen_UStemplateemail
so just copy them to hered
appdesignfrontenddefaultieclocaleen_UStemplateemail
now we need to override them so when mails go they will use our tempaltes, if we dont copy those tempaltes when user updates magento all will wasted.
now copy all these folder in your magento app folder
folder are here in vaseem magento help for magento
replacements are
replace alt="Magento” with alt="your store name”
replace Magento Demo Store with your store name
replace mailto:magento@varien.com with mailto:email@yourstore.com
replace dummyemail@magentocommerce.com with email@yourstore.com
replace (800) DEMO-STORE with (0800) YOUR STORE NUMBER
replace Monday - Friday, 8am - 5pm PST with your own store opening times and timezone
------------------------------------------
change your website name store name
once you send mails or user get mails after shopping, he get name as Main Store
so you can change this here
System-> Manage Store
store name saved in this table
SELECT * FROM `core_store_group` WHERE `name` like '%Main Store%'
main website name table `core_website`
------------------------------------------
404 error page
http://www.lotusseedsdesign.com/blog/spice-up-404-page
------------------------------------------
change contents of email templates (while users shop or visit something admin or users get mail that they have shop for particular product so we can change these info like magento default logo and main store)
admin->
------------------------------------------
force contact us form to mail details to your business id
change this
Configuration-> Contacts and set options accordingly
add more fields in this form
http://www.lotusseedsdesign.com/blog/spice-up-contact-form-in-magento
------------------------------------------
change text in admin
System->Configuration menu
in left side Current Configuration Scope:
Default Config
Advanced->Developer
Translate Inline > Enabled for Admin = Yes
now you can see the book on each text just click and change the text and refresh the page to see changes.
------------------------------------------
admin emails notification, enable emails when user place and order or do some more things.
go here in admin to enable these settings
System->Configuration menu. Scroll down to Sales section and click on the Sales Emails and select the first section Orders.
------------------------------------------
change currency Rp to Rs
libZendLocaleData/en.xml
find this <currency type="INR"> and change symbol to Rs
<symbol>Rs</symbol>
now go to admin system - config - currency set up
Base currency = indian rupee
Default display currency = indian rupee
Allowed currencies = indian rupee and others
------------------------------------------
this means it wont show right col in that page
suppose i wrote the below line in customer.xml file so when this xml loads it wont show right part
<remove name="right"/>
------------------------------------------
upload megento online server steps to be taken while uploading all local files and db to online
moving files and database
I assume these two steps are obvious:
1. copy all of your local files to production server
2. dump your magento local db and import it into your production server db
editing in production server
now on your production server you need to follow these two steps:
1. edit app/etc/local.xml file and change database info
2. in production db,in its core_config_data table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:
SELECT * FROM `core_config_data` WHERE `value` LIKE 'http://vaseem%';
3. Do not forget to delete var folder contents
4. it'd better if you remove the content of app/etc/use_cache.ser too
Make sure you delete the contents of the var directory.
done
When u export ur local db to online there u find problem that u did not used table prefix at local but at online u have table prefix
so u can open the appetclocal.xml file online and remove the table prefix.
if u dont want to remove the table prefix then u can do this
u need to rename table with that prefix.
so u can run this query
rename table
tb1 to tb11,
tb2 to tb22
featured product slider
6 Steps to creating a featured products jQuery slider for Magento
http://onerutter.com/web/6-steps-to-creating-a-featured-products-jquery-slider-for-magento.html
------------------------------------------
calling custom phtml files or custom phtml pages in admin
block type for manullay created phtml files we write this block type in content of admin
{{block type="catalog/product_list" template="catalog/product/categories.phtml"}}
------------------------------------------
show best selling products on home page from particular category
<h3>Best Selling Products</h3>
{{block type="catalog/product_list" category_id="8" template="catalog/product/homelist.phtml"}}
homelist.phtml can be found here
http://www.magentocommerce.com/wiki/how_to/add_featured_products_to_home_page
create a category in admin named as featured and note down its id in our example it is 8
and all products under this category will shown in home page.
------------------------------------------
show tags in front
just write this in admin in manage pages
{{block type="tag/popular" template="tag/popular.phtml"}}
------------------------------------------
Polls
=====
remove poll from home page
admin -> System -> Configuration -> Advanced -> Mage_Poll = Disable
go to poll.xml in layout folder and comment few lines
it can be removed from admin view this link or image
http://www.codestash.com/etc/pollandnews.jpg
http://www.codestash.com/2008/08/removing-callouts-like-polls-newsletter-in-magento-homepage/
by default poll html comes from this page
appdesignfrontendblanklloydstemplatepollactive.phtml
------------------------------------------
how to change the default layout of categories view page to 3 col to 2column left/right
magento/index.php/catalog/category/view/s/living-room/id/22/
this page layout is by default 3 col but we can change it by opening page.xml file
and find this
<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
and write this
<block type="page/html" name="root" output="toHtml" template="page/2columns-right.phtml">
done
------------------------------------------
bestseller module in magento
{{block type=”ActiveCodeline/Bestseller” template=”activecodeline/bestseller.phtml”}}
static blocks creation and calling
create a block in admin with identifier="menu" and contents
<li><a href="{{store url="about"}}"><span>About Us</span></a></li>
<li><a href="{{store url="testimonials"}}"><span>Testimonials</span></a></li>
<li><a href="{{store url="contacts"}}"><span>Contact Us</span></a></li>
------------------------------------------
write this code in any phtml file to show categories in verticle manner
<ul>
<?php
$obj = new Mage_Catalog_Block_Navigation();
$store_cats = $obj->getStoreCategories();
$current_cat = $obj->getCurrentCategory();
$current_cat = (is_object($current_cat) ? $current_cat->getName() : '');
foreach ($store_cats as $cat) {
if ($cat->getName() == $current_cat) {
echo '<li class="current"><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a>n<ul>n";
foreach ($obj->getCurrentChildCategories() as $subcat) {
echo '<li><a href="'.$this->getCategoryUrl($subcat).'">'.$subcat->getName()."</a></li>n";
}
echo "</ul>n</li>n";
} else {
echo '<li><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a></li>n";
}
}
?>
</ul>
show category in left side
write this in admin manage pages-->home page--> custom design
<reference name="right">
<block type="catalog/navigation" name="catalog.leftnavig" before="-" template="catalog/navigation/left_menu1.phtml"/>
{{block type=”featuredproducts/listing” template=”inchoo/block_featured_products.phtml”}}
</reference>
and create page template/catalog/navigation/
<div class="box layered-nav">
<div class="head">
<h3><?php echo $this->__('Browse By') ?></h3>
</div>
<div class="border-creator">
<div class="narrow-by">
<dl id="narrow-by-list">
<dd>
<ol>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<dt>
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="active"<?php endif ?>><?php echo $this->htmlEscape($_category->getName()) ?></a>
</dt>
<?php endforeach ?>
</ol>
</dd>
</dl><script type="text/javascript">decorateDataList('narrow-by-list')</script>
</div>
</div>
</div>
------------------------------------------
show categories in left sidebar in verticle and horizontal manner
open templatecatalognavigationtop.phtml
by default this code is there
cats will be in horizontal manner and hover on them will show subcats in verticle menu
<ul id="nav">
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
so categories are showing 1 2 3 4 and hover on them will show subcats in verticle fashion, this is good when we want to show cats in header menu like i did in real estate website pconstructions.gr
but if we want to show cats and its subcats in left sidebar and hover on cats will show subcats in horizontal manner then use this
cats will be in verticle manner and hover on them will show subcats in horizontal+verticle menu
1
11
12
13 (hope u understood)
2
3
4
use this
<ul id="nav">
<li><a href="<?php echo $this->getUrl() ?>"><?php echo $this->__('Home') ?></a></li>
<li onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)">
<a href="<?php echo $this->getUrl('') ?>"><?php echo $this->__('Products') ?></a>
<ul>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
</li>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('menu')->toHtml(); ?>
</ul>
show cats and subscats in left nav
# Furniture
* Living Room
* Bedroom
# Electronics
* Cell Phones
* Cameras
o Accessories
o Digital Cameras
* Computers
to show like above
go to admin home page and custom layout
add this
<reference name="left">
<block type="catalog/navigation" before="-" name="catalog.sidebar" template="catalog/navigation/sidebar.phtml"/>
</reference>
------------------------------------------
languages show defaultdefaulttemplatepageswitch
------------------------------------------
sitemap in magento
url index.php/catalog/seo_sitemap/category/
advanced search
index.php/catalogsearch/advanced/
------------------------------------------
use this code in phtml file to show static blocks created in admin
the pages u created in admin and enabled will show on front on link.
ex
* Home page
* About Us
* Customer Service
* Enable Cookies
* Help Page
<div>
<?php $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
<?php $collection->getSelect()
->where('is_active = 1'); ?>
<ul>
<?php foreach ($collection as $page): ?>
<?php $PageData = $page->getData(); ?>
<?php if($PageData['identifier']!='no-route') { ?>
<li>
<a href="<?=$this->getBaseUrl(''); echo $PageData['identifier']?>"><?php echo $PageData['title'] ?></a>
</li>
<?php } ?>
<?php endforeach; ?>
</div>
show categories in left sidebar as verticle navigation
http://www.magentocommerce.com/boards/viewthread/4722/
------------------------------------------
call phtml files in admin
just at home page custom design
write this in custom design and layout must be 2colm with right
<reference name="right">
<block type="newsletter/subscribe" name="subscribe" before="-" template="newsletter/subscribe.phtml"/>
</reference>
write this in general info
{{block type="banner/banner" template="banner/banner.phtml"}}
{{block type="contest/contest" template="contest/contest_home.phtml"}}
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
{{block type="catalog/navigation" template="catalog/product/list_random.phtml"}}
create static block in cms and call it at home page from cms as well like this
{{block type="cms/block" block_id="advertise-management"}}
------------------------------------------
Simple random banner rotator in Magento using static blocks
http://asia-connect.com.vn/2009/10/simple-random-banner-rotator-in-magento-using-static-blocks/
------------------------------------------
run magento local on other computers in lan
go this table
core_config_data
and replace localhost to ur pc name like vaseem
u need to replace only 2 entries
but to work on all the pages of magento need to make changes in 3 more tables.
------------------------------------------
magento extensions
lightbox = magento-community/magento_easy_lightbox setting must be beta
RicoNeitzel_VertNav = categories in left side
captcha
magento-community/Fontis_Recaptcha
after install log out from admin
go here admin -> configuration -> recaptcha in bottom
set public and private keys in that
show in stock products on home page
magento-community/Lucky_InStockOnly
this extension wont show products which are out of stock in frontend
------------------------------------------
echo in mgento
<?php echo $this->__('vaseem') ?>
------------------------------------------
show product of particular category at home page
manage pages --> home page --> custom layout
<reference name="right">
<block type="catalog/product_list" category_id="10" before="-" template="catalog/product/list.phtml"/>
</reference>
------------------------------------------
how to get child of categories in left nav or anywhere on home page
http://www.magentocommerce.com/boards/viewthread/14901/
implemented in magento
------------------------------------------
call a static block created in admin(cms-->static block) in phtml template file
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('left_cat')->toHTML();?>
------------------------------------------
call phtml in xml file
open page.xml and write
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer2.phtml">
suppose u want to show vert_nav in left then open catalog xml and do this
<reference name="right">
<block type="catalog/navigation" name="catalog.vertnav" before="-" template="catalog/navigation/vert_nav.phtml" />
</reference>
guide to magento, start magento here
Important points that will afeect your working and productivity
1. first of all off the cache in admin here
system> cache mgt select all cache = no cache
select All Cache = disable
admin login problem in magento
appcodecoreMageCoreModelSessionAbstractVarien.php
line no 78 comment last 3 lines
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
$this->getSkinUrl('images/logo.gif');
skin url <?=$this->getSkinUrl();?> to be written on phtml pages
and in admin u can write this
{{skin url='images/media/best_selling_img01.jpg'}}
<img src="{{skin url=""}}images/payments.gif" alt="payments" /> // to call a single image in some static block
show newsletter in front from admin type this in admin home page
{{block type='core/template' name='contactForm' template='newsletter/subscribe.phtml'}}
homepage url baseurl use in phtml files
<?=$this->getBaseUrl();?>
use this in admin
<a href="{{store url=""}}">Home</a>
<!-- HOME BUTTON HACK -->
<li><a href="<?=$this->getUrl('')?>">Home</a></li>
<!-- HOME BUTTON HACK -->
breadcrumb
http://activecodeline.com/add-breadcrumbs-in-magento-to-pages-that-dont-have-them
categories menu in top comes from appdesignfrontenddefaultchildcaretemplatecatalognavigationtop.phtml
import/export products in magento
http://chasesagum.com/how-to-import-products-into-magento
System >> Import/Export >> Profiles
http://vaseemansari.blogspot.com/2010/01/how-to-import-products-into-magento.html
---------------------------------------------------
After upgrade from 1.3.1.1 to 1.3.2, when I try to save a product, it reports error SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘created_at’ in ‘field list’....................what should I do???
Column not found: 1054 Unknown column 'created_at' in 'field list'
System > Cache Management > Rebuild Catalog Index/Rebuild Flat Catalog Category/Rebuild Flat Catalog Product
Click rebuild for each one and it’ll add that field into the new database
---------------------------------------------------
Community Poll
Compare Products
Newsletter
My Cart all above comes from appdesignfrontenddefaultiectemplatecatalogproductcompare
---------------------------------------------------
Magento – Display new products on the home page
go to home page in admin
CMS “Manage Pages” and select “Home Page”
write this
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
or
{{block type="catalog/product_new" template="catalog/product/new.phtml"}}
now in manage products only those products which are marked as new using “Set Product as New from Date” and “Set Product as New to Date” options in the “General” product information page in the admin tool will be shown.)
Dynamic Category Landing Pages
http://asia-connect.com.vn/2009/07/tips-for-creating-dynamic-category-landing-pages/
How to show particular C
Today i am providing a Magento help file on a special request of my Developer friend Mr. Vinayak Jee.
This file is very useful and each line written in this file is written by me manually. So if you find any problem in any line of code written below please feel free to ask me by posting a comment. I will reply very soon.
Every question and their answers can be found and solved here about Megento.
Install a fresh copy of magento theme
Login to magento admin
http://vaseem/IEC/magento/index.php/admin/
go to System-> Theme, select current theme, delete it in next window,
1) Delete the content of the folder /var
2) Change the values of the file /app/etc/local.xml
There you can find your connection string data (database user, host and name) and table prefix.
3) Once you got your database uploaded, you need to make some changes.
- Run this query:
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
------------------------------------------
How to Reset admin password in magento
You need to go into PHPMyAdmin and connect to your Magento database on your server.
UPDATE admin_user SET password=MD5('pass') WHERE username='admin';
------------------------------------------
Customizing magento template
http://www.themeswiki.org/Customizing_Magento
admin panel
http://localhost/magento/index.php/admin
run magento from local to online
http://www.magentocommerce.com/boards/viewthread/27272/
------------------------------------------
path of magento config file
E:WampwwwmagentoappcodecoreMageInstallModelInstaller
------------------------------------------
add front footer and meta and keyword
1. Open the Magento admin panel
2. Select the "System" tab
3. Click the "Configuration" menu item
4. Select the "Design" menu item
5. Click the "Footer" tab. Here you can change the copyright notification
6. With that done, click the "Save Configure" button.
------------------------------------------
send mails to admin after product sale and invoice and more mails here
Log in into admin area, System->Configuration menu. Scroll down to Sales section and click on the Sales Emails and select the first section Orders. Enter your admin e-mail in the field “Send Order Email Copy To”.
Sending an email to notify admin where there's a new review posted
Admin Review Notification
http://www.magentocommerce.com/extension/1869/admin-review-notification
------------------------------------------
get product name and id on templatecatalogproductlist.phtml page
echo $Product_Name = $this->htmlEscape($_product->getName());
$Product_Id = $this->getAddToCartUrl($_product);
how i used
<?php $Product_Name = $this->htmlEscape($_product->getName());
$Product_Id = $this->getAddToCartUrl($_product);
$Product_Id = strstr($Product_Id,'product');
$Pro_arr = explode("product", $Product_Id);
$Product_Id = str_replace("/","",$Pro_arr[1]);
$Product = $Product_Id .'-'. $Product_Name; // getting product name and id
?>
<div class="out-of-stock"><a href="<?php echo $this->getUrl() ?>send_query?<?=$Product;?>"><?php echo $this->__('Send Query') ?></a></div>
------------------------------------------
delete all categories before uplaoding your demo website to online category table
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
insert into `catalog_category_entity`(`entity_id`,`entity_type_id`,`attribute_set_id`,`parent_id`,`created_at`,`updated_at`,`path`,`position`,`level`,`children_count`) values (1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),(2,3,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
insert into `catalog_category_entity_int`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) values (1,3,32,0,2,1),(2,3,32,1,2,1);
insert into `catalog_category_entity_varchar`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) values (1,3,31,0,1,'Root Catalog'),(2,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),(5,3,33,0,2,'default-category');
------------------------------------------
export categories with id in csv file
create a file and save it in tempalte folder /catalog/allcategories.phtml
<?
$category = Mage::getModel ( 'catalog/category' );
$tree = $category->getTreeModel ();
$tree->load ();
$ids = $tree->getCollection ()->getAllIds ();
if ($ids) {
$fp = fopen('var/import/catwithid.csv', 'a');
fwrite($fp, 'catId, catNamen');
foreach ( $ids as $id ) {
$string = $id . ', ' .$category->load($id)->getName() . 'n';
fwrite($fp, $string);
}
fclose($fp);
}
?>
in admin manage pages - create new page
Export-Categories
and run it like this
http://indianexportcenter.com/Export-Categories
{{block type="core/template" template="catalog/allcategories.phtml"}}
it will run the file and save a file here var/import/catwithid.csv this file must exist there.
------------------------------------------
magento db database and tables
cataloginventory_stock_status it have stock quantity field which must be more than zero to make send query work
`catalogsearch_fulltext` saves meta tag and meta desc of products
`catalog_product_entity_varchar` saves product name and other info
------------------------------------------
manage pages in admin saves in `cms_page` table
so you can upload this table to online for changing manage pages same as local
category comes from table `catalog_category_entity_varchar`
------------------------------------------
mails from magento
all mails in admin can be set here System -> Configuration -> Store Email Addresses
mail to user after account creation
after newsletter subscribe
------------------------------------------
recover admin password reset
UPDATE `admin_user` SET `password`=MD5('pass') WHERE `username`='admin';
------------------------------------------
set title of pages in frontend of magento store
open page.xml and write this line at line no 60
<action method="setTitle" translate="title"><title>Indian Export Center Store for All People's need</title></action>
------------------------------------------
create module with mysql query or db integration custom table
http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table
------------------------------------------
simple contact form module custom with mail sending and notification
1. appetcmodulesVaseem_SimpleContact.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_SimpleContact>
<active>true</active>
<codePool>local</codePool>
</Vaseem_SimpleContact>
</modules>
</config>
2. appcodelocalVaseemSimpleContactetcconfig.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_SimpleContact>
<version>0.1.0</version>
</Vaseem_SimpleContact>
</modules>
<frontend>
<routers>
<JustSomeFreeRouterNameHereNo1>
<use>standard</use>
<args>
<module>Vaseem_SimpleContact</module>
<!--front end will be accessed like this http://vaseem/IEC/magento/index.php/vaseem-simplecontact/ -->
<frontName>vaseem-simplecontact</frontName>
</args>
</JustSomeFreeRouterNameHereNo1>
</routers>
</frontend>
</config>
appcodelocalVaseemSimpleContactcontrollersIndexController.php
<?php
class Vaseem_SimpleContact_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
//Get current layout state
$this->loadLayout();
$block = $this->getLayout()->createBlock(
'Mage_Core_Block_Template',
'vaseem.simple_contact',
array(
'template' => 'vaseem/simple_contact.phtml'
)
);
$this->getLayout()->getBlock('content')->append($block);
//$this->getLayout()->getBlock('right')->insert($block, 'catalog.compare.sidebar', true);
$this->_initLayoutMessages('core/session');
$this->renderLayout();
}
public function sendemailAction()
{
//Fetch submited params
$params = $this->getRequest()->getParams();
$mail = new Zend_Mail();
$mail->setBodyText($params['comment']);
$mail->setFrom($params['email'], $params['name']);
$mail->addTo('somebody_else@example.com', 'Some Recipient');
$mail->setSubject('Test Vaseem_SimpleContact Module for Magento');
try {
$mail->send();
}
catch(Exception $ex) {
Mage::getSingleton('core/session')->addError('Unable to send email. Sample of a custom notification error from Vaseem_SimpleContact.');
}
//Redirect back to index action of (this) vaseem-simplecontact controller
$this->_redirect('vaseem-simplecontact/');
// after mail send this page comes so this name must be same as frontName in config.xml of etc folder
}
}
?>
3. appdesignfrontenddefaultiectemplatevaseemsimple_contact.phtml
<div class="box simple_contact">
<form id="simple_contact_form" name="simple_contact_form" action="<?php echo $this->getUrl('vaseem-simplecontact/') ?>index/sendemail" method="post">
<fieldset class="group-select">
<h4 class="legend">Vaseem_SimpleContact module sample</h4>
<ul>
<li>
<div class="input-box">
<label for="name">Gimme your name <span class="required">*</span></label><br />
<input name="name" id="name" title="Name" value="" class="required-entry input-text" type="text" />
</div>
<div class="input-box">
<label for="email">And your email <span class="required">*</span></label><br />
<input name="email" id="email" title="Email" value="" class="required-entry input-text validate-email" type="text" />
</div>
<div class="clear"></div>
<div class="input-box">
<label for="comment">Some comment?</label><br />
<textarea name="comment" id="comment" title="Comment" class="required-entry input-text" style="height:100px;" cols="50" rows="3"></textarea>
</div>
</li>
</ul>
</fieldset>
<div class="button-set">
<p class="required">* Required Fields</p>
<button class="form-button" type="submit"><span>Submit</span></button>
</div>
</form>
</div>
4. run like this http://vaseem/IEC/magento/index.php/vaseem-simplecontact/
------------------------------------------
custom hello world module in magento and call that phtml page directly in url
this module is using IndexController.php method
1. create xml file at
appetcmodulesVaseem_Example.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_Example>
<active>true</active>
<codePool>local</codePool>
</Vaseem_Example>
</modules>
</config>
2. create folder case sensitive like this
appcodelocalVaseemExamplecontrollers
appcodelocalVaseemExampleBlock
appcodelocalVaseemExampleetc
now create files here appcodelocalVaseemExamplecontrollersIndexController.php
<?
class Vaseem_Example_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout(array('default'));
$this->renderLayout();
}
}
?>
appcodelocalVaseemExampleBlockExample.php
<?
class Vaseem_Example_Block_Example extends Mage_Core_Block_Template
{
// necessary methods
}
?>
appcodelocalVaseemExampleetcconfig.xml
<?xml version="1.0"?>
<config>
<global>
<modules>
<vaseem_example>
<version>0.1.0</version>
</vaseem_example>
</modules>
<blocks>
<example>
<rewrite>
<example>Vaseem_Example_Block_Example</example>
</rewrite>
</example>
</blocks>
</global>
<frontend>
<routers>
<example>
<use>standard</use>
<args>
<module>Vaseem_Example</module>
<frontName>example</frontName>
</args>
</example>
</routers>
<layout>
<updates>
<example>
<file>example.xml</file>
</example>
</updates>
</layout>
</frontend>
</config>
3. Define Frontend Template : xml file in layout folder
go theme folder appdesignfrontenddefaultieclayoutexample.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<example_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block type="example/example" name="hello" template="example/example.phtml"/>
</reference>
</example_index_index>
</layout>
4. Create template file appdesignfrontenddefaultiectemplateexampleexample.phtml
Hello World ! I am a Magento Guy Vaseem Ansari..
Hey, new module is ready to run and hit browser with url <br />
http://localhost/project_name/index.php/example/
<br />
and see result. Is it easy or not ? what you think ?
5. run the file http://vaseem/IEC/magento/index.php/example/
------------------------------------------
custom hello world module in magento and call it in admin
1. create xml file at
appetcmodulesVaseem_All.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_Example> <!-- MyCompany is folder in appcodelocalMyCompany and Vaseem is folder in MyCompany-->
<!-- this is an active module -->
<active>true</active>
<!-- this module will be located in app/code/local code pool -->
<codePool>local</codePool>
</Vaseem_Example>
</modules>
</config>
2. create folder case sensitive like this
appcodelocalVaseemExampleetc
appcodelocalVaseemExampleBlock
now create file here appcodelocalVaseemExampleetcconfig.xml
<?xml version="1.0"?>
<config>
<modules>
<Vaseem_Example>
<version>0.1.0</version>
</Vaseem_Example>
</modules>
<global>
<blocks>
<vaseem_example>
<class>Vaseem_Example_Block</class>
</vaseem_example>
</blocks>
</global>
</config>
now create file here appcodelocalVaseemExampleBlockView.php
<?php
/**
* Example View block
*
* @codepool Local
* @category Vaseem
* @package Vaseem_Example
* @module Example
*/
class Vaseem_Example_Block_View extends Mage_Core_Block_Template
{
private $message;
private $att;
protected function createMessage($msg) {
$this->message = $msg;
}
public function receiveMessage() {
if($this->message != '') {
return $this->message;
} else {
$this->createMessage('Hello Vaseem');
return $this->message;
}
}
protected function _toHtml() {
$html = parent::_toHtml();
if($this->att = $this->getMyCustom() && $this->getMyCustom() != '') {
$html .= '<br />'.$this->att;
} else {
$html .= '<br />No Custom Attribute Found';
}
return $html;
}
}
3. go theme folder appdesignfrontenddefaultiectemplate
create folder exampleview.phtml
<?php
/**
* Fido view template
*
* @see Fido_Example_Block_View
*
*/
?>
<div>
<span><strong>This is the output of the Vaseem example:</strong></span><br />
<span style="color:#FF9933;">
<?php
echo $this->receiveMessage();
?>
</span>
</div>
4. in admin manage pages -> home page
call your view.phtml file like this
{{block type="vaseem_example/view" my_custom="Test" template="example/view.phtml" }}
or
call in xml file
<reference name="right">
<block type="fido_example/view" my_custom="Test" template="example/view.phtml" />
</reference>
//this will add your block in the right column
------------------------------------------
show product quantity with add to cart button
show product available quantity in store
use this
<?= (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()?>
i used in calatog/product/list.phtml
------------------------------------------
delete all products in magento
TRUNCATE TABLE `catalog_product_entity`;
or to completely remove all use this
TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;
TRUNCATE TABLE `catalog_product_entity_int`;
TRUNCATE TABLE `catalog_product_entity_media_gallery`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`;
TRUNCATE TABLE `catalog_product_entity_text`;
TRUNCATE TABLE `catalog_product_entity_tier_price`;
TRUNCATE TABLE `catalog_product_entity_varchar`;
TRUNCATE TABLE `catalog_product_link`;
TRUNCATE TABLE `catalog_product_link_attribute`;
TRUNCATE TABLE `catalog_product_link_attribute_decimal`;
TRUNCATE TABLE `catalog_product_link_attribute_int`;
TRUNCATE TABLE `catalog_product_link_attribute_varchar`;
TRUNCATE TABLE `catalog_product_link_type`;
TRUNCATE TABLE `catalog_product_option`;
TRUNCATE TABLE `catalog_product_option_price`;
TRUNCATE TABLE `catalog_product_option_title`;
TRUNCATE TABLE `catalog_product_option_type_price`;
TRUNCATE TABLE `catalog_product_option_type_title`;
TRUNCATE TABLE `catalog_product_option_type_value`;
TRUNCATE TABLE `catalog_product_super_attribute`;
TRUNCATE TABLE `catalog_product_super_attribute_label`;
TRUNCATE TABLE `catalog_product_super_attribute_pricing`;
TRUNCATE TABLE `catalog_product_super_link`;
TRUNCATE TABLE `catalog_product_enabled_index`;
TRUNCATE TABLE `catalog_product_website`;
TRUNCATE TABLE `catalog_product_entity`;
TRUNCATE TABLE `cataloginventory_stock`;
TRUNCATE TABLE `cataloginventory_stock_item`;
TRUNCATE TABLE `cataloginventory_stock_status`;
insert into `catalog_product_link_type`(`link_type_id`,`code`) values (1,'relation'),(2,'bundle'),(3,'super'),(4,'up_sell'),(5,'cross_sell');
insert into `catalog_product_link_attribute`(`product_link_attribute_id`,`link_type_id`,`product_link_attribute_code`,`data_type`) values (1,2,'qty','decimal'),(2,1,'position','int'),(3,4,'position','int'),(4,5,'position','int'),(6,1,'qty','decimal'),(7,3,'position','int'),(8,3,'qty','decimal');
insert into `cataloginventory_stock`(`stock_id`,`stock_name`) values (1,'Default');
------------------------------------------
display new products on magento home page
type this in admin home page
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
------------------------------------------
how to delete test orders before launch of magento store
admin-> sales-> you find nothing so u need to run manual query in db
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_order`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
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_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_varchar` 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 `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` 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;
-- 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;
-- Reset all ID counters
TRUNCATE `eav_entity_store`;
ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
u are done now
------------------------------------------
send emails on users shopping
email templates reside in this folder
applocaleen_UStemplateemail
so if u wanna make changes in these tempaltes dont make change at above location just copy them at this folder
appdesignfrontenddefaultieclocaleen_UStemplateemail
and now u can make changes in them
calling emails address in email tempaltes dynamically
if u write this sales@{{var customer.store.name}}.com instead of dummyemail@magentocommerce.com in e mail templates it will work.
override email tempaltes
http://yviktorov.github.com/magento/2009/05/23/override-email-templates.html
when user buy some product he get mails
so we can just change the template of those e mails by doing this
those e mail tempaltes are in this folder
applocaleen_UStemplateemail
so just copy them to hered
appdesignfrontenddefaultieclocaleen_UStemplateemail
now we need to override them so when mails go they will use our tempaltes, if we dont copy those tempaltes when user updates magento all will wasted.
now copy all these folder in your magento app folder
folder are here in vaseem magento help for magento
replacements are
replace alt="Magento” with alt="your store name”
replace Magento Demo Store with your store name
replace mailto:magento@varien.com with mailto:email@yourstore.com
replace dummyemail@magentocommerce.com with email@yourstore.com
replace (800) DEMO-STORE with (0800) YOUR STORE NUMBER
replace Monday - Friday, 8am - 5pm PST with your own store opening times and timezone
------------------------------------------
change your website name store name
once you send mails or user get mails after shopping, he get name as Main Store
so you can change this here
System-> Manage Store
store name saved in this table
SELECT * FROM `core_store_group` WHERE `name` like '%Main Store%'
main website name table `core_website`
------------------------------------------
404 error page
http://www.lotusseedsdesign.com/blog/spice-up-404-page
------------------------------------------
change contents of email templates (while users shop or visit something admin or users get mail that they have shop for particular product so we can change these info like magento default logo and main store)
admin->
------------------------------------------
force contact us form to mail details to your business id
change this
Configuration-> Contacts and set options accordingly
add more fields in this form
http://www.lotusseedsdesign.com/blog/spice-up-contact-form-in-magento
------------------------------------------
change text in admin
System->Configuration menu
in left side Current Configuration Scope:
Default Config
Advanced->Developer
Translate Inline > Enabled for Admin = Yes
now you can see the book on each text just click and change the text and refresh the page to see changes.
------------------------------------------
admin emails notification, enable emails when user place and order or do some more things.
go here in admin to enable these settings
System->Configuration menu. Scroll down to Sales section and click on the Sales Emails and select the first section Orders.
------------------------------------------
change currency Rp to Rs
libZendLocaleData/en.xml
find this <currency type="INR"> and change symbol to Rs
<symbol>Rs</symbol>
now go to admin system - config - currency set up
Base currency = indian rupee
Default display currency = indian rupee
Allowed currencies = indian rupee and others
------------------------------------------
this means it wont show right col in that page
suppose i wrote the below line in customer.xml file so when this xml loads it wont show right part
<remove name="right"/>
------------------------------------------
upload megento online server steps to be taken while uploading all local files and db to online
moving files and database
I assume these two steps are obvious:
1. copy all of your local files to production server
2. dump your magento local db and import it into your production server db
editing in production server
now on your production server you need to follow these two steps:
1. edit app/etc/local.xml file and change database info
2. in production db,in its core_config_data table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:
SELECT * FROM `core_config_data` WHERE `value` LIKE 'http://vaseem%';
3. Do not forget to delete var folder contents
4. it'd better if you remove the content of app/etc/use_cache.ser too
Make sure you delete the contents of the var directory.
done
When u export ur local db to online there u find problem that u did not used table prefix at local but at online u have table prefix
so u can open the appetclocal.xml file online and remove the table prefix.
if u dont want to remove the table prefix then u can do this
u need to rename table with that prefix.
so u can run this query
rename table
tb1 to tb11,
tb2 to tb22
featured product slider
6 Steps to creating a featured products jQuery slider for Magento
http://onerutter.com/web/6-steps-to-creating-a-featured-products-jquery-slider-for-magento.html
------------------------------------------
calling custom phtml files or custom phtml pages in admin
block type for manullay created phtml files we write this block type in content of admin
{{block type="catalog/product_list" template="catalog/product/categories.phtml"}}
------------------------------------------
show best selling products on home page from particular category
<h3>Best Selling Products</h3>
{{block type="catalog/product_list" category_id="8" template="catalog/product/homelist.phtml"}}
homelist.phtml can be found here
http://www.magentocommerce.com/wiki/how_to/add_featured_products_to_home_page
create a category in admin named as featured and note down its id in our example it is 8
and all products under this category will shown in home page.
------------------------------------------
show tags in front
just write this in admin in manage pages
{{block type="tag/popular" template="tag/popular.phtml"}}
------------------------------------------
Polls
=====
remove poll from home page
admin -> System -> Configuration -> Advanced -> Mage_Poll = Disable
go to poll.xml in layout folder and comment few lines
it can be removed from admin view this link or image
http://www.codestash.com/etc/pollandnews.jpg
http://www.codestash.com/2008/08/removing-callouts-like-polls-newsletter-in-magento-homepage/
by default poll html comes from this page
appdesignfrontendblanklloydstemplatepollactive.phtml
------------------------------------------
how to change the default layout of categories view page to 3 col to 2column left/right
magento/index.php/catalog/category/view/s/living-room/id/22/
this page layout is by default 3 col but we can change it by opening page.xml file
and find this
<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
and write this
<block type="page/html" name="root" output="toHtml" template="page/2columns-right.phtml">
done
------------------------------------------
bestseller module in magento
{{block type=”ActiveCodeline/Bestseller” template=”activecodeline/bestseller.phtml”}}
static blocks creation and calling
create a block in admin with identifier="menu" and contents
<li><a href="{{store url="about"}}"><span>About Us</span></a></li>
<li><a href="{{store url="testimonials"}}"><span>Testimonials</span></a></li>
<li><a href="{{store url="contacts"}}"><span>Contact Us</span></a></li>
------------------------------------------
write this code in any phtml file to show categories in verticle manner
<ul>
<?php
$obj = new Mage_Catalog_Block_Navigation();
$store_cats = $obj->getStoreCategories();
$current_cat = $obj->getCurrentCategory();
$current_cat = (is_object($current_cat) ? $current_cat->getName() : '');
foreach ($store_cats as $cat) {
if ($cat->getName() == $current_cat) {
echo '<li class="current"><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a>n<ul>n";
foreach ($obj->getCurrentChildCategories() as $subcat) {
echo '<li><a href="'.$this->getCategoryUrl($subcat).'">'.$subcat->getName()."</a></li>n";
}
echo "</ul>n</li>n";
} else {
echo '<li><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a></li>n";
}
}
?>
</ul>
show category in left side
write this in admin manage pages-->home page--> custom design
<reference name="right">
<block type="catalog/navigation" name="catalog.leftnavig" before="-" template="catalog/navigation/left_menu1.phtml"/>
{{block type=”featuredproducts/listing” template=”inchoo/block_featured_products.phtml”}}
</reference>
and create page template/catalog/navigation/
<div class="box layered-nav">
<div class="head">
<h3><?php echo $this->__('Browse By') ?></h3>
</div>
<div class="border-creator">
<div class="narrow-by">
<dl id="narrow-by-list">
<dd>
<ol>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<dt>
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="active"<?php endif ?>><?php echo $this->htmlEscape($_category->getName()) ?></a>
</dt>
<?php endforeach ?>
</ol>
</dd>
</dl><script type="text/javascript">decorateDataList('narrow-by-list')</script>
</div>
</div>
</div>
------------------------------------------
show categories in left sidebar in verticle and horizontal manner
open templatecatalognavigationtop.phtml
by default this code is there
cats will be in horizontal manner and hover on them will show subcats in verticle menu
<ul id="nav">
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
so categories are showing 1 2 3 4 and hover on them will show subcats in verticle fashion, this is good when we want to show cats in header menu like i did in real estate website pconstructions.gr
but if we want to show cats and its subcats in left sidebar and hover on cats will show subcats in horizontal manner then use this
cats will be in verticle manner and hover on them will show subcats in horizontal+verticle menu
1
11
12
13 (hope u understood)
2
3
4
use this
<ul id="nav">
<li><a href="<?php echo $this->getUrl() ?>"><?php echo $this->__('Home') ?></a></li>
<li onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)">
<a href="<?php echo $this->getUrl('') ?>"><?php echo $this->__('Products') ?></a>
<ul>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
</li>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('menu')->toHtml(); ?>
</ul>
show cats and subscats in left nav
# Furniture
* Living Room
* Bedroom
# Electronics
* Cell Phones
* Cameras
o Accessories
o Digital Cameras
* Computers
to show like above
go to admin home page and custom layout
add this
<reference name="left">
<block type="catalog/navigation" before="-" name="catalog.sidebar" template="catalog/navigation/sidebar.phtml"/>
</reference>
------------------------------------------
languages show defaultdefaulttemplatepageswitch
------------------------------------------
sitemap in magento
url index.php/catalog/seo_sitemap/category/
advanced search
index.php/catalogsearch/advanced/
------------------------------------------
use this code in phtml file to show static blocks created in admin
the pages u created in admin and enabled will show on front on link.
ex
* Home page
* About Us
* Customer Service
* Enable Cookies
* Help Page
<div>
<?php $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
<?php $collection->getSelect()
->where('is_active = 1'); ?>
<ul>
<?php foreach ($collection as $page): ?>
<?php $PageData = $page->getData(); ?>
<?php if($PageData['identifier']!='no-route') { ?>
<li>
<a href="<?=$this->getBaseUrl(''); echo $PageData['identifier']?>"><?php echo $PageData['title'] ?></a>
</li>
<?php } ?>
<?php endforeach; ?>
</div>
show categories in left sidebar as verticle navigation
http://www.magentocommerce.com/boards/viewthread/4722/
------------------------------------------
call phtml files in admin
just at home page custom design
write this in custom design and layout must be 2colm with right
<reference name="right">
<block type="newsletter/subscribe" name="subscribe" before="-" template="newsletter/subscribe.phtml"/>
</reference>
write this in general info
{{block type="banner/banner" template="banner/banner.phtml"}}
{{block type="contest/contest" template="contest/contest_home.phtml"}}
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
{{block type="catalog/navigation" template="catalog/product/list_random.phtml"}}
create static block in cms and call it at home page from cms as well like this
{{block type="cms/block" block_id="advertise-management"}}
------------------------------------------
Simple random banner rotator in Magento using static blocks
http://asia-connect.com.vn/2009/10/simple-random-banner-rotator-in-magento-using-static-blocks/
------------------------------------------
run magento local on other computers in lan
go this table
core_config_data
and replace localhost to ur pc name like vaseem
u need to replace only 2 entries
but to work on all the pages of magento need to make changes in 3 more tables.
------------------------------------------
magento extensions
lightbox = magento-community/magento_easy_lightbox setting must be beta
RicoNeitzel_VertNav = categories in left side
captcha
magento-community/Fontis_Recaptcha
after install log out from admin
go here admin -> configuration -> recaptcha in bottom
set public and private keys in that
show in stock products on home page
magento-community/Lucky_InStockOnly
this extension wont show products which are out of stock in frontend
------------------------------------------
echo in mgento
<?php echo $this->__('vaseem') ?>
------------------------------------------
show product of particular category at home page
manage pages --> home page --> custom layout
<reference name="right">
<block type="catalog/product_list" category_id="10" before="-" template="catalog/product/list.phtml"/>
</reference>
------------------------------------------
how to get child of categories in left nav or anywhere on home page
http://www.magentocommerce.com/boards/viewthread/14901/
implemented in magento
------------------------------------------
call a static block created in admin(cms-->static block) in phtml template file
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('left_cat')->toHTML();?>
------------------------------------------
call phtml in xml file
open page.xml and write
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer2.phtml">
suppose u want to show vert_nav in left then open catalog xml and do this
<reference name="right">
<block type="catalog/navigation" name="catalog.vertnav" before="-" template="catalog/navigation/vert_nav.phtml" />
</reference>
guide to magento, start magento here
Important points that will afeect your working and productivity
1. first of all off the cache in admin here
system> cache mgt select all cache = no cache
select All Cache = disable
admin login problem in magento
appcodecoreMageCoreModelSessionAbstractVarien.php
line no 78 comment last 3 lines
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
$this->getSkinUrl('images/logo.gif');
skin url <?=$this->getSkinUrl();?> to be written on phtml pages
and in admin u can write this
{{skin url='images/media/best_selling_img01.jpg'}}
<img src="{{skin url=""}}images/payments.gif" alt="payments" /> // to call a single image in some static block
show newsletter in front from admin type this in admin home page
{{block type='core/template' name='contactForm' template='newsletter/subscribe.phtml'}}
homepage url baseurl use in phtml files
<?=$this->getBaseUrl();?>
use this in admin
<a href="{{store url=""}}">Home</a>
<!-- HOME BUTTON HACK -->
<li><a href="<?=$this->getUrl('')?>">Home</a></li>
<!-- HOME BUTTON HACK -->
breadcrumb
http://activecodeline.com/add-breadcrumbs-in-magento-to-pages-that-dont-have-them
categories menu in top comes from appdesignfrontenddefaultchildcaretemplatecatalognavigationtop.phtml
import/export products in magento
http://chasesagum.com/how-to-import-products-into-magento
System >> Import/Export >> Profiles
http://vaseemansari.blogspot.com/2010/01/how-to-import-products-into-magento.html
---------------------------------------------------
After upgrade from 1.3.1.1 to 1.3.2, when I try to save a product, it reports error SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘created_at’ in ‘field list’....................what should I do???
Column not found: 1054 Unknown column 'created_at' in 'field list'
System > Cache Management > Rebuild Catalog Index/Rebuild Flat Catalog Category/Rebuild Flat Catalog Product
Click rebuild for each one and it’ll add that field into the new database
---------------------------------------------------
Community Poll
Compare Products
Newsletter
My Cart all above comes from appdesignfrontenddefaultiectemplatecatalogproductcompare
---------------------------------------------------
Magento – Display new products on the home page
go to home page in admin
CMS “Manage Pages” and select “Home Page”
write this
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
or
{{block type="catalog/product_new" template="catalog/product/new.phtml"}}
now in manage products only those products which are marked as new using “Set Product as New from Date” and “Set Product as New to Date” options in the “General” product information page in the admin tool will be shown.)
Dynamic Category Landing Pages
http://asia-connect.com.vn/2009/07/tips-for-creating-dynamic-category-landing-pages/
How to show particular C
Chikako Hatsumi
at
7:07 PM
Subscribe to:
Posts (Atom)






















