Skip to content

Commit

Permalink
Merge pull request #323 from firegento/development
Browse files Browse the repository at this point in the history
Release 2.5.0
  • Loading branch information
Schrank authored Mar 15, 2018
2 parents 802d5ff + 6f0ac38 commit b370256
Show file tree
Hide file tree
Showing 111 changed files with 154 additions and 226 deletions.
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Central features of MageSetup are:
* Automatical generation of meta data to products
* Saving of every status change of newsletter subscriptions
* Presets are configurable via xml files for every country seperately
* Many more, see the [full list of features](https://github.com/firegento/firegento-magesetup/blob/development/docs/features/features.markdown) including several screenshots.
* Many more, see the [full list of features](https://github.com/firegento/firegento-magesetup/blob/development/docs/features/features.md) including several screenshots.

Requirements
------------
Expand Down Expand Up @@ -62,7 +62,7 @@ Contribution
------------
Any contribution to the development of MageSetup is highly welcome. The best possibility to provide any code is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).

Please also see have a look at our [contribution guide](https://github.com/firegento/firegento-magesetup/blob/master/docs/contribute/contribute.markdown) for this extension and our [general contribution process](https://github.com/firegento/coding-guidelines/blob/master/guidelines/05_CONTRIBUTIONS.md) for FireGento extensions.
Please also see have a look at our [contribution guide](https://github.com/firegento/firegento-magesetup/blob/development/docs/contribute/contribute.md) for this extension and our [general contribution process](https://github.com/firegento/coding-guidelines/blob/master/guidelines/05_CONTRIBUTIONS.md) for FireGento extensions.

Developer
---------
Expand Down
20 changes: 11 additions & 9 deletions docs/contribute/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ FireGento_MageSetup - Contribute
You would like to contribute to MageSetup by adding a new country. Thank you very much!
Here you'll find information about how to add a new country to this module.

##Small introduction
## Small introduction
**What does MageSetup do?**
MageSetup helps you to setup your Magento-Shop at the very beginning to get correct taxes, email templates, payment
agreements, cms pages, etc. according to the country which you want to sell your products in.

##General settings
## General settings
First of all, you have to add your country to the file config.xml (app/code/community/FireGento/MageSetup/etc/config.xml).
In config->global->available_countries you just add your country, by making a self closing tag with the iso2 code of your country.

![General Settings in config.xml](https://raw.github.com/firegento/firegento-magesetup/development/docs/contribute/images/countries.png "config.xml")

After that, add a folder here: app/code/community/FireGento/MageSetup/etc/
Expand All @@ -28,14 +29,15 @@ You can take the default files from the folder app/code/community/FireGento/Mage
If any of these 5 files does not exist, it falls back to the default folder.
Usually, having a tax.xml and in many cases an email.xml is sufficient.

##Setting up the agreements
## Setting up the agreements
If you have special billing agreements or likewise in your country, you need to copy the file agreements.xml
from the default folder.
After that change the agreements.xml the way you need it.

##Setting up the cms pages
## Setting up the cms pages
- If special cms pages are needed in your country, copy it from the default folder and change the cms.xml the way you need it.
Here is an example of a node for a cms page with an explanation of the tags.

![General Settings for cms pages](https://raw.github.com/firegento/firegento-magesetup/development/docs/contribute/images/cms-pages.png "cms pages")

<pre>
Expand All @@ -49,7 +51,7 @@ Here is an example of a node for a cms page with an explanation of the tags.

If the footer link is set, the cms page will be shown as a link on the footer menu in the block footer_links.

##Setting up the email templates
## Setting up the email templates
- The email templates depend on the localization of your country.
If you need to change it, just copy the email.xml from default folder and change the way you need it.
Here is an example of a node for an email template with an explanation of the tags.
Expand Down Expand Up @@ -79,7 +81,7 @@ If the business terms tag is set, the mail template will include the business te

If the add_revocation tag is set, the mail template will include the revocations from the shop.

##Setting up the system configuration
## Setting up the system configuration
If you need to change some configuration settings, just copy the systemconfig.xml from default and change the way you need it.
![Settings for system configuration](https://raw.github.com/firegento/firegento-magesetup/development/docs/contribute/images/system-config.png "system configuration")

Expand All @@ -88,7 +90,7 @@ customer__create_account__confirm -> This is the path to the backend configurati
</pre>
If you want to add other settings, just apply to the way it's shown here.

##Setting up the taxes
## Setting up the taxes
Taxes are a bit tricky, because it's different all over the world.

* If it's an eu country and there are two tax rates, than copy the tax.xml from the folder **uk** (folder gb).
Expand All @@ -98,9 +100,9 @@ Taxes are a bit tricky, because it's different all over the world.

After that, you can adjust the settings. Please try to change only the text fields and the percentages of the tax calculation rates.

##Setting up translation files, mail templates and agreements
## Setting up translation files, mail templates and agreements
To setup all translations for mail templates and so on, you need to create a new subfolder in app/locale.
Copy the en_US folder and give it the corresponding name for your language.
After that you need to do the hard work and translate the text parts of every file by hand.

This step is only needed for new languages which were not supported before.
This step is only needed for new languages which were not supported before.
4 changes: 2 additions & 2 deletions docs/features/features.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FireGento_MageSetup - Features
=====================
##Contents
## Contents
- [Setup features](#setup-features)
- [Backend features](#backend-features)
- [Frontend features](#frontend-features)
Expand Down Expand Up @@ -114,4 +114,4 @@ You can choose a different language for every store view.
- Calculate shipping tax class depending on products in cart
* Use highest product tax class as shipping tax class
* Or use the tax rate of products that make up the biggest amount
![Shipping tax class](https://raw.github.com/firegento/firegento-magesetup/development/docs/features/images/shipping-tax-class.png "Shipping tax class")
![Shipping tax class](https://raw.github.com/firegento/firegento-magesetup/development/docs/features/images/shipping-tax-class.png "Shipping tax class")
1 change: 1 addition & 0 deletions modman
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ src/app/design/frontend/base/default/layout/magesetup.xml app/design/fro
src/app/design/frontend/base/default/template/magesetup/ app/design/frontend/base/default/template/magesetup/
src/app/design/frontend/rwd/default/template/magesetup/ app/design/frontend/rwd/default/template/magesetup/
src/skin/frontend/base/default/css/magesetup/ skin/frontend/base/default/css/magesetup
src/skin/frontend/base/default/js/magesetup/ skin/frontend/base/default/js/magesetup
src/skin/frontend/rwd/default/css/magesetup/ skin/frontend/rwd/default/css/magesetup
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.4.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 1.1.4
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 1.1.4
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.4.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down Expand Up @@ -79,9 +77,14 @@ public function getTaxRate()
*/
public function getFormattedTaxRate()
{
if ($this->getTaxRate() === null
|| $this->getProduct()->getTypeId() == 'bundle'
) {
if ($this->getTaxRate() === null) {
return '';
}

if ($this->getProduct()->getTypeId() === 'bundle'
&& $this->getProduct()->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC) {
// the tax rate for a bundle product with dynamic pricing is undefined
// it cannot be configured in the backend and depends on the respective child products
return '';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/
/**
* Enhanced block for product price display of all products in spite of bundles (got own block!).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down Expand Up @@ -171,7 +169,7 @@ public function getFormattedTaxRate()
public function isIncludingTax()
{
if (!$this->getData('is_including_tax')) {
$includesTax = Mage::helper('tax')->priceIncludesTax();
$includesTax = Mage::helper('tax')->getConfig()->getPriceDisplayType();
$this->setData('is_including_tax', $includesTax);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down Expand Up @@ -57,6 +55,7 @@ public function getAgreements()
}

$this->_addRevocationProductTypesFilter($agreements);
$agreements->setOrder('position', Varien_Data_Collection::SORT_ORDER_ASC);
}

$this->setAgreements($agreements);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 1.0.5
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
*/

class FireGento_MageSetup_Helper_Contacts_Data extends Mage_Contacts_Helper_Data
class FireGento_MageSetup_Helper_Contacts extends Mage_Core_Helper_Abstract
{

const XML_PATH_ACCEPT_AGREEMENT = 'contacts/contacts/accept_agreement';

/**
* Avoid loss of translation
*/
public function __construct()
{
$this->_moduleName = 'Mage_Contacts';
}
/** @var string $_moduleName Module name */
protected $_moduleName = 'FireGento_MageSetup';

public function isAcceptAgreement()
{
Expand Down
23 changes: 14 additions & 9 deletions src/app/code/community/FireGento/MageSetup/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.1.0
*/

/**
Expand All @@ -33,23 +31,29 @@ class FireGento_MageSetup_Helper_Data extends Mage_Core_Helper_Abstract
// Add support for Magento < 1.7
const XML_PATH_EU_COUNTRIES_LIST = 'general/country/eu_countries';

protected static $_shippingCostUrl;

/**
* Generate URL to configured shipping cost page, or '' if none.
*
* @return string Shipping cost url
*/
public function getShippingCostUrl()
{
/** @var $cmsPage Mage_Cms_Model_Page */
$cmsPage = Mage::getModel('cms/page')
->setStoreId(Mage::app()->getStore()->getId())
->load(Mage::getStoreConfig('catalog/price/cms_page_shipping'));
if (static::$_shippingCostUrl === null) {
/** @var $cmsPage Mage_Cms_Model_Page */
$cmsPage = Mage::getModel('cms/page')
->setStoreId(Mage::app()->getStore()->getId())
->load(Mage::getStoreConfig('catalog/price/cms_page_shipping'));

if (!$cmsPage->getId() || !$cmsPage->getIsActive()) {
return '';
if (!$cmsPage->getId() || !$cmsPage->getIsActive()) {
static::$_shippingCostUrl = '';
} else {
static::$_shippingCostUrl = Mage::getUrl(null, array('_direct' => $cmsPage->getIdentifier()));
}
}

return Mage::helper('cms/page')->getPageUrl($cmsPage->getId());
return static::$_shippingCostUrl;
}

/**
Expand Down Expand Up @@ -137,6 +141,7 @@ public function getDeliveryTimeFromProduct($product)
$deliveryTime = null;
break;
}

return $deliveryTime;
}
}
2 changes: 0 additions & 2 deletions src/app/code/community/FireGento/MageSetup/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @author FireGento Team <[email protected]>
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 2.2.2
* @since 0.2.0
*/

/**
Expand Down
Loading

0 comments on commit b370256

Please sign in to comment.