Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

OXIDprojects/6vC-NA-Shop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

-------------------------------------------------------------------------------------------------
INFORMATION
-------------------------------------------------------------------------------------------------

- This extension applies localization to a shop (currency, address, etc.) for use in countries
  such as USA, Canada, Australia, and New Zealand.
- License requires a modest credit to original developer in the form of a link-back (see LICENSE file)
- Have questions AFTER reading this?  Go here: http://forum.oxid-esales.com/showthread.php?t=16197


-------------------------------------------------------------------------------------------------
INSTALLATION
-------------------------------------------------------------------------------------------------

1. Prerequisites & Compatability

- Compatible with OXID eShop 4.6.x (last verified with 4.6.5).
- v6c_basic theme based off of oxid_esales_CE 4.4.5 (not publicly available)

2. Copy Files

- Copy all directories in package to root web directory.  This will include a new theme based off of azure.


2. CONFIG.INC.PHP Changes

Enable region (state/province) specific tax by appending the following to the config.inc.php file.  Change
according to your needs (for example, replace provinces with states).  Note that multiple taxes can be
defined for each region and each tax is assigned a label.

    /**
     * V6C addition to support tax calculations in NAShop extension.
     */
    $this->aRegionTax = array(  'AB' => array('GST' => 5), 		// GST
                                'BC' => array('HST' => 12), 	// HST
                                'MB' => array('GST' => 5), 		// GST
                                'NB' => array('HST' => 13), 	// HST
                                'NL' => array('HST' => 13), 	// HST
    							'NT' => array('GST' => 5), 		// GST
    							'NS' => array('HST' => 15), 	// HST
    							'NU' => array('GST' => 5), 		// GST
    							'ON' => array('HST' => 13), 	// HST
        						// PE & QC are special in that the advertised PST rate is taxed ontop of GST costs.
    							// As a result, if PST is applicable, an effective PST rate must be calc'd as follows:
    							// PSTeffective = PST*(1 + GST/100)
    							'PE' => array('GST' => 5), 		// GST
    							'QC' => array('TPS' => 5, 'TVQ' => 8.5*(1 + 5/100)),
    							'SK' => array('GST' => 5), 		// GST
    							'YT' => array('GST' => 5)  		// GST
                               );


3. ADMIN/BACKEND Settings

- Under
- Clear the tmp directory and refresh the Admin page or the following settings will not be visible.
- Press Install/Update button under 6vC Modules>North America Shop then press the update db views button under Service>Tools.
- Unless you want otherwise: 6vC Modules>North America Shop> Enable "Do not include taxes in prices" option.
- 6vC Modules>North America Shop> Enable "Prefix currency sign to prices" option.
- Master Settings>Core Settings>Settings>Other settings> Remove oxuser__oxstreetnr and oxaddress__oxstreetnr from the list box for "Mandatory fields in User Registration Form".
- Master Settings>Core Settings>Settings>Other settings> Add oxuser__oxstateid and oxaddress__oxstateid to the list box for "Mandatory fields in User Registration Form".
- Unless you want otherwise: Master Settings>Themes>Azure>Settings>Features> Uncheck "Use listmania".
- Enable v6c_azure theme under Master Settings>Themes.

4. Misc. Setup Tips

- W/i config.inc.php, set the string argument in the date_default_timezone_set call to the appropriate value.
- If only using one currency, can uncheck "Enable Multiple Currencies" under Master Settings>Core Settings>Perform.>Enhanced Performance Settings
- If you want news to show on all pages disable "Load News only on Start Page" under Master Settings>Core Settings>Perform.>Enhanced Performance Settings
- Select domestic country (click country and make sure it's highlighted!) otherwise the default is none (Master Settings>Core Settings>Settings>Global).
- Disable unwanted RSS feeds under Master Settings>Core Settings>Settings>Other Settings
- Can disable tags and control # of news articles under Master Settings>Core Settings>Settings>Shop frontend
- If product reviews/ratings is not desired, deactivate under Master Settings>Core Settings>Perform.>Enhanced Performance Settings
- Can enable moderating user reviews under Master Settings>Core Settings>System>Other Settings
- Compare list, vouchers, gift registry, and gift wrapping features are found under Themes>[Theme]>Settings>Features
- If changing favicon.ico, note that there are two locations: home folder and template img folder.

-------------------------------------------------------------------------------------
Below is summary of changes/fixes made to adapt the shop to North American standards.
-------------------------------------------------------------------------------------

- Config option added that will omit all tax calculations on prices displayed in shop and apply tax only to
  the final checkout price (v6c_naprice.php).  Enabling this option essentially enables the NA-Tax method.

- Hard-coding of currency sign in templates removed.  Currency sign now included into
  currency formating function.  Additionally, a config option is provided to change the position of the
  currency sign from trailing (right-side) to leading (left-side).

- Removed asterix character (*) from prices that acted as a note about taxes being included.

- Variable costs determined from address & payment options only shown on order page (removed from basket page).

- Changed layout of user addresses.

- Sort state/province abbreviations in user address forms (v6c_nacountry.php)

- Allow different and multiple tax values to be assigned to different states/provinces (v6c_nataxselector.php).
  Currently, requires mods to config.inc.php file.


--------------------------------------------------------------------------------------------------------
Notes to consider regarding changed functionality of the eShop.
--------------------------------------------------------------------------------------------------------

- If the NAShop config option NA-Tax is set to ON/enabled, taxes involving multiple values will be calculated
  individually, as is the ideal case.  If NA-Tax is OFF/disabled, tax will be calculated from the cumulative
  percentage.  Note that, due to rounding, these may result in different order totals!  This is due to the
  following difference:
  		NA-Tax=ON: 	GROSS = NET + Round(NET*(TAX1/100)) + Round(NET*(TAX2/100))
  		NA-Tax=OFF:	GROSS = NET + Round(NET*(TAX1+TAX2)/100)
  Ideally, the calculation method used for NA-Tax=ON would always be used, but this would require some major
  code changes.  This is due to oxvatselector::getUserVat returning a double value throughout the code while
  proper support for multiple taxes would require an array to be returned.


--------------------------------------------------------------------------------------------------------
TODOs
--------------------------------------------------------------------------------------------------------

- Add french characters to SEO character mapping upon install.
- Link position of currency sign to currency type.

About

Localizes an OXID e-shop for North America (currency, addresses, taxes, and more...)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%