Skip to content

Commit b370256

Browse files
authored
Merge pull request #323 from firegento/development
Release 2.5.0
2 parents 802d5ff + 6f0ac38 commit b370256

File tree

111 files changed

+154
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+154
-226
lines changed

README.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Central features of MageSetup are:
3131
* Automatical generation of meta data to products
3232
* Saving of every status change of newsletter subscriptions
3333
* Presets are configurable via xml files for every country seperately
34-
* Many more, see the [full list of features](https://github.com/firegento/firegento-magesetup/blob/development/docs/features/features.markdown) including several screenshots.
34+
* Many more, see the [full list of features](https://github.com/firegento/firegento-magesetup/blob/development/docs/features/features.md) including several screenshots.
3535

3636
Requirements
3737
------------
@@ -62,7 +62,7 @@ Contribution
6262
------------
6363
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).
6464

65-
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.
65+
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.
6666

6767
Developer
6868
---------

docs/contribute/contribute.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ FireGento_MageSetup - Contribute
33
You would like to contribute to MageSetup by adding a new country. Thank you very much!
44
Here you'll find information about how to add a new country to this module.
55

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

11-
##General settings
11+
## General settings
1212
First of all, you have to add your country to the file config.xml (app/code/community/FireGento/MageSetup/etc/config.xml).
1313
In config->global->available_countries you just add your country, by making a self closing tag with the iso2 code of your country.
14+
1415
![General Settings in config.xml](https://raw.github.com/firegento/firegento-magesetup/development/docs/contribute/images/countries.png "config.xml")
1516

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

31-
##Setting up the agreements
32+
## Setting up the agreements
3233
If you have special billing agreements or likewise in your country, you need to copy the file agreements.xml
3334
from the default folder.
3435
After that change the agreements.xml the way you need it.
3536

36-
##Setting up the cms pages
37+
## Setting up the cms pages
3738
- 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.
3839
Here is an example of a node for a cms page with an explanation of the tags.
40+
3941
![General Settings for cms pages](https://raw.github.com/firegento/firegento-magesetup/development/docs/contribute/images/cms-pages.png "cms pages")
4042

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

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

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

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

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

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

91-
##Setting up the taxes
93+
## Setting up the taxes
9294
Taxes are a bit tricky, because it's different all over the world.
9395

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

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

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

106-
This step is only needed for new languages which were not supported before.
108+
This step is only needed for new languages which were not supported before.

docs/features/features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FireGento_MageSetup - Features
22
=====================
3-
##Contents
3+
## Contents
44
- [Setup features](#setup-features)
55
- [Backend features](#backend-features)
66
- [Frontend features](#frontend-features)
@@ -114,4 +114,4 @@ You can choose a different language for every store view.
114114
- Calculate shipping tax class depending on products in cart
115115
* Use highest product tax class as shipping tax class
116116
* Or use the tax rate of products that make up the biggest amount
117-
![Shipping tax class](https://raw.github.com/firegento/firegento-magesetup/development/docs/features/images/shipping-tax-class.png "Shipping tax class")
117+
![Shipping tax class](https://raw.github.com/firegento/firegento-magesetup/development/docs/features/images/shipping-tax-class.png "Shipping tax class")

modman

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ src/app/design/frontend/base/default/layout/magesetup.xml app/design/fro
2828
src/app/design/frontend/base/default/template/magesetup/ app/design/frontend/base/default/template/magesetup/
2929
src/app/design/frontend/rwd/default/template/magesetup/ app/design/frontend/rwd/default/template/magesetup/
3030
src/skin/frontend/base/default/css/magesetup/ skin/frontend/base/default/css/magesetup
31+
src/skin/frontend/base/default/js/magesetup/ skin/frontend/base/default/js/magesetup
3132
src/skin/frontend/rwd/default/css/magesetup/ skin/frontend/rwd/default/css/magesetup

src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Magesetup.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.4.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 1.1.4
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status/Grid.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 1.1.4
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Notifications.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.4.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**
@@ -79,9 +77,14 @@ public function getTaxRate()
7977
*/
8078
public function getFormattedTaxRate()
8179
{
82-
if ($this->getTaxRate() === null
83-
|| $this->getProduct()->getTypeId() == 'bundle'
84-
) {
80+
if ($this->getTaxRate() === null) {
81+
return '';
82+
}
83+
84+
if ($this->getProduct()->getTypeId() === 'bundle'
85+
&& $this->getProduct()->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC) {
86+
// the tax rate for a bundle product with dynamic pricing is undefined
87+
// it cannot be configured in the backend and depends on the respective child products
8588
return '';
8689
}
8790

src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price/Abstract.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321
/**
2422
* Enhanced block for product price display of all products in spite of bundles (got own block!).

src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**
@@ -171,7 +169,7 @@ public function getFormattedTaxRate()
171169
public function isIncludingTax()
172170
{
173171
if (!$this->getData('is_including_tax')) {
174-
$includesTax = Mage::helper('tax')->priceIncludesTax();
172+
$includesTax = Mage::helper('tax')->getConfig()->getPriceDisplayType();
175173
$this->setData('is_including_tax', $includesTax);
176174
}
177175

src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price/Abstract.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Checkout/Agreements.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**
@@ -57,6 +55,7 @@ public function getAgreements()
5755
}
5856

5957
$this->_addRevocationProductTypesFilter($agreements);
58+
$agreements->setOrder('position', Varien_Data_Collection::SORT_ORDER_ASC);
6059
}
6160

6261
$this->setAgreements($agreements);

src/app/code/community/FireGento/MageSetup/Block/Checkout/Information.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Customer/Account/Agreements.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Imprint/Content.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Block/Imprint/Field.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Helper/Catalog/Product/Configuration.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 1.0.5
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Helper/Checkout/Data.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

2422
/**

src/app/code/community/FireGento/MageSetup/Helper/Contacts/Data.php renamed to src/app/code/community/FireGento/MageSetup/Helper/Contacts.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,12 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
*/
2121

22-
class FireGento_MageSetup_Helper_Contacts_Data extends Mage_Contacts_Helper_Data
22+
class FireGento_MageSetup_Helper_Contacts extends Mage_Core_Helper_Abstract
2323
{
24-
2524
const XML_PATH_ACCEPT_AGREEMENT = 'contacts/contacts/accept_agreement';
2625

27-
/**
28-
* Avoid loss of translation
29-
*/
30-
public function __construct()
31-
{
32-
$this->_moduleName = 'Mage_Contacts';
33-
}
26+
/** @var string $_moduleName Module name */
27+
protected $_moduleName = 'FireGento_MageSetup';
3428

3529
public function isAcceptAgreement()
3630
{

src/app/code/community/FireGento/MageSetup/Helper/Data.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.1.0
2220
*/
2321

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

34+
protected static $_shippingCostUrl;
35+
3636
/**
3737
* Generate URL to configured shipping cost page, or '' if none.
3838
*
3939
* @return string Shipping cost url
4040
*/
4141
public function getShippingCostUrl()
4242
{
43-
/** @var $cmsPage Mage_Cms_Model_Page */
44-
$cmsPage = Mage::getModel('cms/page')
45-
->setStoreId(Mage::app()->getStore()->getId())
46-
->load(Mage::getStoreConfig('catalog/price/cms_page_shipping'));
43+
if (static::$_shippingCostUrl === null) {
44+
/** @var $cmsPage Mage_Cms_Model_Page */
45+
$cmsPage = Mage::getModel('cms/page')
46+
->setStoreId(Mage::app()->getStore()->getId())
47+
->load(Mage::getStoreConfig('catalog/price/cms_page_shipping'));
4748

48-
if (!$cmsPage->getId() || !$cmsPage->getIsActive()) {
49-
return '';
49+
if (!$cmsPage->getId() || !$cmsPage->getIsActive()) {
50+
static::$_shippingCostUrl = '';
51+
} else {
52+
static::$_shippingCostUrl = Mage::getUrl(null, array('_direct' => $cmsPage->getIdentifier()));
53+
}
5054
}
5155

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

5559
/**
@@ -137,6 +141,7 @@ public function getDeliveryTimeFromProduct($product)
137141
$deliveryTime = null;
138142
break;
139143
}
144+
140145
return $deliveryTime;
141146
}
142147
}

src/app/code/community/FireGento/MageSetup/Model/Config.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* @author FireGento Team <[email protected]>
1818
* @copyright 2013-2015 FireGento Team (http://www.firegento.com)
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20-
* @version 2.2.2
21-
* @since 0.2.0
2220
*/
2321

2422
/**

0 commit comments

Comments
 (0)