Read this in other languages: English, Español
Supported & Tested in Magento versions 1.7.x.x to 1.9.x.x
- Clone the project.
- Copy the plugin content into the home directory of Magento
- Erase all cache
system ==> Cache Management
==> Flush Magento Cache
==> Flush Cache Storage
==> Flush Catalog and Images Cache
==> Flush Javascript/css Cache
By doing this, NPS option is added to Magento menu
- Configure your new NPS payment method ==> System ==> Configuration ==> Payment Methods:
Complete with Merchant data:
Enable ==> Yes || No
New order status ==> Processing
Payment Action ==> Autorize || Authorize and Capture
Title ==> NPS (Net Payment Service)
Secret Key ==> Secret Key Assigned to Merchant
Gateway URL ==> https://implementacion.nps.com.ar/ws.php?wsdl
Merchant ID ==> Merchant_id Assigned to Merchant
Merchant's Email ==> [email protected]
Credit Card Types ==> Choose cards brand to use
Payment from Applicable Countries ==> All Allowed Countries || Specific Countries
Payment from Specific Countries ==> Choose countries to use
- Configure installment settings to allow payments ==> Click in NPS from Main Menu ==> Installments ==> Add Installments
cc_type ==> Card Brand
qty ==> Installment quantities
rate ==> Interst
Status ==> Enable || Disable
Country ==> AR
Currency ==> ARS
If you did not do it during the installation, Verify (or Configure) Currency and Country
System ==> Configuration ==> General
Configure Country options
System ==> Configuration ==> Currency Setup
This section is a transcription from other site. Source article here
The next step is to create the actual stores in Magento. Lets say we want to add a new store mysecondstore.com.
- Log into your Magento Admin Panel
- Click on Catalog > Manage Categories
- Click on Add Root Category
- Enter a name for the new category and make sure Is Active is set to True
- Click on the Display Settings tab and set Is Anchor to True. This will show products listed in sub categories, and also enable product drill-down functionality (filtering) for the category.
- Click Save Category
Before we start configuring our stores, lets pause for a minute and explain the concepts of Websites, Stores, and Store Views in Magento. Websites are the top-most entity in Magento. If you want completely separate sites that do not share cart, shipping methods, etc., you should create separate Websites. Each Website has at least one Store, and each Store has at least one Store View. Multiple Stores can share cart, user sessions, payment gateways, etc., but have their own catalog structure. Finally, a Store is a collection of Store Views. Store Views change the way pages are presented, normally used to offer a site in different layouts or languages.
- Go to System > Manage Stores
- Click Create Website and enter the following information: (Skip this step if you don't want separate Websites)
- Name - enter a name for the new website
- Code - enter a unique identifier for this website
(Make a note of this code as you will need it later!)
- Click Create Store and enter the following:
- Website - select the website you just created from the dropdown;
- Name - enter a name for the store;
- Root Category - select the category you created in the previous step.
- Click Create Store View and the information as follows
- Store - select the store you created in the previous step
- Name - enter a name for the store view
- Code - enter a unique identifier for this store view (Make a note of this code as you will need it later!)
This is where you will add additional store views if you plan on setting up a site for each language you support for example.
- Now, go to System > Configuration > General
- Make sure Default Config is selected as the Current Configuration Scope
- On the Web tab, set Auto-redirect to Base URL to No and click Save Config
- Now, change the Configuration Scope dropdown to you newly created website
- Under the Web section, we now need to change the Secure Base URL and Unsecure Base URL settings. Uncheck the Use Default [STORE VIEW], and replace the URL's with your corresponding domain name. Remember to include the trailing /.
- Click Save Configuration
This completes the configuration of the new store. Repeat these steps for each additional store you want to add.
So far we have added the additional domains to the server and configured the new store in Magento. Now we just need to glue it together by telling Magento which store to load based on the domain name the user is on.
- On the server, open the .htaccess file, located in the root directory of your Magento installation, in your favorite text editor. You can also use the File Manager in your control panel.
- Add the following lines (replace with actual domain names):
SetEnvIf Host www\.domain1\.com MAGE_RUN_CODE=domain1_com
SetEnvIf Host www\.domain1\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^domain1\.com MAGE_RUN_CODE=domain1_com
SetEnvIf Host ^domain1\.com MAGE_RUN_TYPE=website
SetEnvIf Host www\.domain2\.com MAGE_RUN_CODE=domain2_com
SetEnvIf Host www\.domain2\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^domain2\.com MAGE_RUN_CODE=domain2_com
SetEnvIf Host ^domain2\.com MAGE_RUN_TYPE=website
Note: the SetEnvIf directive is not supported by all web servers (e.g. LiteSpeed). In that case, the store code can be set in this way:
RewriteCond %{HTTP_HOST} www\.domain1\.com [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:domain1_com]
RewriteCond %{HTTP_HOST} www\.domain1\.com [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]
RewriteCond %{HTTP_HOST} www\.domain2\.com [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:domain2_com]
RewriteCond %{HTTP_HOST} www\.domain2\.com [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]
- MAGE_RUN_CODE - this is the unique code chosen when you created the Magento Website / Store View
- MAGE_RUN_TYPE - depending on whether you want to load a specific Website or Store View; set it to website or store, respectively.
Add an entry for each additional domain you have set up.
- Save the file
Now navigate to you new site and verify that the correct Magento store is loaded. If not, make sure that the the MAGE_RUN_CODE match the one created earlier and that the domain resolves to the correct folder/path.