diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..c0fa0fd4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+build.sh
+build.default.properties
+build.xml
+.DS_Store
+*.cache.properties
+*~
+*.swp
+build.properties
+.buildpath
+.project
+.settings
+.settings/**/*
+.externalToolBuilders
+.externalToolBuilders/**/*
+.vagrant
+.vagrant/**/*
+Vagrantfile
+/.idea
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..57820c42
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+language: php
+php:
+ - 5.3
+before_install:
+ - mkdir test/
+ - curl -sS https://getcomposer.org/installer | php
+ - chmod +x ./composer.phar
+ - ./composer.phar --version
+ - ./composer.phar install --dev
+before_script:
+ - CURR_DIR=$(pwd)
+ - bin/mage-ci install test 1.7.0.2 magento_test -c -t -r http://mage-ci.ecomdev.org
+ - bin/mage-ci install-module test $CURR_DIR
+ - git clone https://github.com/EcomDev/EcomDev_PHPUnit.git ./phpunit/
+ - bin/mage-ci install-module $CURR_DIR/test $CURR_DIR/phpunit/
+script:
+ - bin/mage-ci phpunit test
diff --git a/README.markdown b/README.markdown
new file mode 100644
index 00000000..cede7fc5
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,75 @@
+FireGento_MageSetup
+=====================
+MageSetup configures a shop for a national market. It's the international variant and successor of [GermanSetup](https://github.com/firegento/firegento-germansetup).
+
+Currently supported countries: Austria, France, Germany, Italy, Russia, Switzerland, United Kingdom. More to follow.
+
+Build Status
+------------
+* Latest Release: [](https://travis-ci.org/firegento/firegento-magesetup)
+* Development Branch: [](https://travis-ci.org/firegento/firegento-magesetup)
+
+Facts
+------
+- Version: check [config.xml](https://github.com/firegento/firegento-magesetup/blob/master/src/app/code/community/FireGento/MageSetup/etc/config.xml)
+- Extension key: FireGento_MageSetup
+- [Extension on GitHub](https://github.com/firegento/firegento-magesetup/)
+
+Description
+------------
+Central features of MageSetup are:
+
+* Setting of important configuration settings
+* Predefined tax settings and tax classes for shipping from several countries to worldwide destinations
+* Assign new tax classes to all products (configurable)
+* Creation of email templates based on the local language pack. Legal texts can be added to some templates automatically.
+* Creation and Activation of Checkout Agreements. Agreements can be shown at customer registration instead of or additional to the checkout. They can be required or not.
+* Creation of default CMS pages like imprint, terms and conditions, privacy, shipping, payment methods.
+* Create email templates, cms pages and blocks as well as checkout agreements for store views with a different language as well
+* Possibility to add tax and/or shipping info to all prices
+* 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
+
+Requirements
+------------
+- PHP >= 5.3.0
+
+Compatibility
+--------------
+- Magento >= 1.6
+
+Installation
+-----------------------
+Please create the desired websites and store view as well as install any language packs before running MageSetup.
+
+Copy all files from the src/ folder to your magento directory in order to install the MageSetup module.
+After you have installed the module, you should clear the cache and log off from admin panel. When you log on again, you should see the following hint:
+
+ MageSetup has been installed. Click here to set up your pages, blocks, emails and tax settings.
+
+If you don't see that hint, please check that the configuration setting **System -> Configuration -> Developer -> Template Settings -> Allow Symlinks** is enabled.
+
+On the linked page, you can make the desired settings and then click "Run MageSetup" on the top or bottom right. The adjustments will be made.
+
+Support
+-------
+If you encounter any problems or bugs, please create an issue on [GitHub](https://github.com/firegento/firegento-magesetup/issues).
+
+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).
+
+Developer
+---------
+FireGento Team
+* Website: [http://firegento.com](http://firegento.com)
+* Twitter: [@firegento](https://twitter.com/firegento)
+
+Licence
+-------
+[GNU General Public License, version 3 (GPLv3)](http://opensource.org/licenses/gpl-3.0)
+
+Copyright
+---------
+(c) 2011-2013 FireGento Team
diff --git a/composer.json b/composer.json
new file mode 100644
index 00000000..1f26be15
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,25 @@
+{
+ "name": "firegento/magesetup",
+ "license": ["GPL-3.0"],
+ "type": "magento-module",
+ "description": "MageSetup configures a shop for a national market. It creates configuration and tax settings, email templates, cms blocks and pages.",
+ "homepage": "https://github.com/firegento/firegento-magesetup",
+ "require": {
+ "magento-hackathon/magento-composer-installer": "*"
+ },
+ "require-dev": {
+ "ecomdev/mage-ci": "master-dev"
+ },
+ "config": {
+ "bin-dir": "bin"
+ },
+ "repositories": [
+ {
+ "type": "composer",
+ "url": "http://packages.firegento.com"
+ }
+ ],
+ "extra":{
+ "magento-root-dir": "test/"
+ }
+}
diff --git a/docs/api/html/classes/FireGento_MageSetup_Adminhtml_NewsletterController.xhtml b/docs/api/html/classes/FireGento_MageSetup_Adminhtml_NewsletterController.xhtml
new file mode 100644
index 00000000..eee0083c
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Adminhtml_NewsletterController.xhtml
@@ -0,0 +1,64 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Adminhtml_NewsletterController - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Adminhtml_NewsletterController
+
+
Newsletter Subscriber Status Adminhtml Controller
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public gridAction( )
+
+
Retrieve the new grid layout via ajax requests
+
+
+
+
+ public indexAction( )
+
+
Displays the newsletter subscribers status history
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Magesetup.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Magesetup.xhtml
new file mode 100644
index 00000000..2dcef7bb
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Magesetup.xhtml
@@ -0,0 +1,201 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Adminhtml_Magesetup - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Adminhtml_Magesetup
+
+
Displays a form with some options to setup things
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Class Constructor
+
+
+
+
Methods
+
+
+
+ public getAvailableCountriesForSetup( )
+
+
Retrieve all available countries for MageSetup
+
+
+ Returns:
+
+ All allowed countries
+
+
+
+
+
+ public getDefaultProductTaxClass( )
+
+
Retrieve the default default new product tax class (yet to be created)
+
+
+ Returns:
+
+ Default Product Tax Class
+
+
+
+
+
+ public getLocaleOptionsForCmsContent( )
+
+
Retrieve all locales where the directory email/template exists
+
+
+ Returns:
+
+ Locale options for CMS content
+
+
+
+
+
+ public getLocaleOptionsForEmailTemplates( )
+
+
Retrieve all locales where the directory email/template exists
+
+
+ Returns:
+
+ Locale options for email templates
+
+
+
+
+
+ public getNewProductTaxClasses( )
+
+
Get new product tax classes (yet to be created)
+
+
+ Returns:
+
+ All new product tax classes
+
+
+
+
+
+ public getPostActionUrl( )
+
+
Retrieve the POST URL for the form
+
+
+
+
+
+ public getProductTaxClasses( )
+
+
Get old product tax classes
+
+
+ Returns:
+
+ All existing product tax classes
+
+
+
+
+
+ public getStores( )
+
+
Retrieve all stores
+
+
+
+
+
+ public isMultiStore( )
+
+
Check if there is more than one Store View
+
+
+ Returns:
+
+ Flag if there are more than one store
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status.xhtml
new file mode 100644
index 00000000..cd11675b
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status.xhtml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status
+
+
Newsletter Subscriber Status Grid Container
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Class constructor
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid.xhtml
new file mode 100644
index 00000000..5eed6b95
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid.xhtml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid
+
+
Newsletter Subscriber Status Grid
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Class constructor
+
+
+
+
Methods
+
+
+
+ public getGridUrl( )
+
+
Retrieve the grid url for ajax reloads
+
+
+
+
+
+ public getRowUrl( Varien_Object $row )
+
+
Deactivate the grid row url
+
+
+
+
+
+
+ protected _prepareCollection( )
+
+
Prepares the grid collection
+
+
+
+
+
+ protected _prepareColumns( )
+
+
Prepares the grid columns
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Notifications.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Notifications.xhtml
new file mode 100644
index 00000000..c3b1e98a
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Adminhtml_Notifications.xhtml
@@ -0,0 +1,102 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Adminhtml_Notifications - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Adminhtml_Notifications
+
+
Displays MageSetup notifications
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public getManageUrl( )
+
+
Get magesetup management url
+
+
+ Returns:
+
+ URL for MageSetup form
+
+
+
+
+
+ public isInitialized( )
+
+
Returns a value that indicates if some of the german setup settings have already been initialized.
+
+
+ Returns:
+
+ Flag if MageSetup is already initialized
+
+
+
+
+
+ protected _construct( )
+
+
(non-PHPdoc)
+
+
+
+
+ protected _toHtml( )
+
+
ACL validation before html generation
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price.xhtml
new file mode 100644
index 00000000..1dc22014
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price.xhtml
@@ -0,0 +1,178 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Bundle_Catalog_Product_Price - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Bundle_Catalog_Product_Price
+
+
Enhanced block for product price display of bundle products. Contains the normal price.phtml rendering and additionally a configured static block.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public _toHtml( )
+
+
Add content of template block below price html if defined in config
+
+
+
+
+
+ public getFormattedTaxRate( )
+
+
Retrieves formatted string of tax rate for user output
+
+
+ Returns:
+
+ Formatted Tax Rate for the given locale
+
+
+
+
+
+ public getFormattedWeight( )
+
+
Get formatted weight incl. unit
+
+
+
+
+
+ public getIsShowWeightInfo( )
+
+
Check if Shipping by Weight is active
+
+
+ Returns:
+
+ Flag if product weight should be displayed
+
+
+
+
+
+ public getTaxRate( )
+
+
Read tax rate from current product.
+
+
+
+
+
+ public isIncludingTax( )
+
+
Returns whether or not the price contains taxes
+
+
+ Returns:
+
+ Flag if prices are shown with including tax
+
+
+
+
+
+ public isShowShippingLink( )
+
+
Returns whether the shipping link needs to be shown on the frontend or not.
+
+
+ Returns:
+
+ Flag if shipping link should be displayed
+
+
+
+
+
+ protected _loadTaxCalculationRate( Mage_Catalog_Model_Product $product )
+
+
Gets tax percents for current product
+
+
+ Parameters:
+
+ $product
- Product Model
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract.xhtml
new file mode 100644
index 00000000..50b6b8d9
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract.xhtml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Catalog_Product_Price.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Catalog_Product_Price.xhtml
new file mode 100644
index 00000000..a951f300
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Catalog_Product_Price.xhtml
@@ -0,0 +1,247 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Catalog_Product_Price - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Block_Catalog_Product_Price
+
+
Enhanced block for product price display of all products in spite of bundles (got own block!).
+
+
Contains the normal price.phtml rendering and additionally a configured static block.
+
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_tierPriceDefaultTemplates
+
+
+
+
Methods
+
+
+
+ public __( )
+
+
Translate block sentence
+
+
+
+
+
+ public _toHtml( )
+
+
Add content of template block below price html if defined in config
+
+
+
+
+
+ public getFormattedTaxRate( )
+
+
Retrieves formatted string of tax rate for user output
+
+
+ Returns:
+
+ Formatted Tax Rate for the given locale
+
+
+
+
+
+ public getFormattedWeight( )
+
+
Get formatted weight incl. unit
+
+
+
+
+
+ public getIsShowWeightInfo( )
+
+
Check if Shipping by Weight is active
+
+
+ Returns:
+
+ Flag if product weight should be displayed
+
+
+
+
+
+ public getTaxRate( )
+
+
Read tax rate from current product.
+
+
+
+
+
+ public isIncludingShippingCosts( )
+
+
Returns whether or not the price contains taxes
+
+
+ Returns:
+
+ Flag if shipping costs are including taxes
+
+
+
+
+
+ public isIncludingTax( )
+
+
Returns whether or not the price contains taxes
+
+
+ Returns:
+
+ Flag if prices are shown with including tax
+
+
+
+
+
+ public isShowShippingLink( )
+
+
Returns whether the shipping link needs to be shown on the frontend or not.
+
+
+ Returns:
+
+ Flag if shipping link should be displayed
+
+
+
+
+
+ protected _addDeliveryTimeHtml( Varien_Object $htmlObject )
+
+
Add delivery time on category pages only
+
+
+ Parameters:
+
+ $htmlObject
- Transport object
+
+
+
+
+
+ protected _loadTaxCalculationRate( Mage_Catalog_Model_Product $product )
+
+
Gets tax percents for current product
+
+
+ Parameters:
+
+ $product
- Product Model
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Catalog_Product_Price_Abstract.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Catalog_Product_Price_Abstract.xhtml
new file mode 100644
index 00000000..65943f1c
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Catalog_Product_Price_Abstract.xhtml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Catalog_Product_Price_Abstract - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Catalog_Product_Price_Abstract
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Checkout_Agreements.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Checkout_Agreements.xhtml
new file mode 100644
index 00000000..86258fd2
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Checkout_Agreements.xhtml
@@ -0,0 +1,76 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Checkout_Agreements - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Checkout_Agreements
+
+
Block to display agreements on checkout.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public getAgreements( )
+
+
Filter by "Agreement Type"
+
+
+
+
+
+ protected _getCustomerSession( )
+
+
Retrieve the customer session
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Checkout_Information.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Checkout_Information.xhtml
new file mode 100644
index 00000000..2221a81e
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Checkout_Information.xhtml
@@ -0,0 +1,74 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Checkout_Information - API Documentation
+
+
+
+
+
+
+
+
Constants
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Block_Checkout_Information
+
+
Block to enable ip anonymization for german tracking.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constants
+
+ XML_PATH_CHECKOUT_DISPLAY_ADDITIONAL_INFORMATION = 'checkout/options/display_additional_information' string
+ XML_PATH_CHECKOUT_ADDITIONAL_INFORMATION = 'checkout/options/additional_information' string
+
+
Methods
+
+
+
+ public getCheckoutAdditionalInformation( )
+
+
Retrieve the additional information for the review page
+
+
+ Returns:
+
+ Additional information
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Customer_Account_Agreements.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Customer_Account_Agreements.xhtml
new file mode 100644
index 00000000..f36d5807
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Customer_Account_Agreements.xhtml
@@ -0,0 +1,60 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Customer_Account_Agreements - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Customer_Account_Agreements
+
+
Block to display agreements on customer registration.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public getAgreements( )
+
+
Filter by "Agreement Type"
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Ga.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Ga.xhtml
new file mode 100644
index 00000000..8fb6a2a7
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Ga.xhtml
@@ -0,0 +1,70 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Ga - API Documentation
+
+
+
+
+
+
+
+
Constants
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Block_Ga
+
+
Block to enable ip anonymization for german tracking.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constants
+
+ CONFIG_GOOGLE_ANALYTICS_IP_ANONYMIZATION = 'google/analytics/ip_anonymization'
+
+
Methods
+
+
+
+ protected _toHtml( )
+
+
Prepare and return block's html output
+
+
+ Returns:
+
+ Google Analytics JS Tracking Code
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Imprint_Content.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Imprint_Content.xhtml
new file mode 100644
index 00000000..3a8f57b4
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Imprint_Content.xhtml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Imprint_Content - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Imprint_Content
+
+
Block to retrieve data from imprint config.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Constructor to set config store view.
+
+
+
+
Methods
+
+
+
+ public getCountry( )
+
+
Retrieve the specific country name by the selected country code
+
+
+
+
+
+ public getWeb( bool $checkForProtocol )
+
+
Retrieve the setting "website". If parameter checkForProtocol is true, check if there is a valid protocol given, otherwise add http:// manually.
+
+
+ Parameters:
+
+ $checkForProtocol
- Flag if website url should be checked for http(s) protocol
+
+
+
+
+
+
+ public setStoreId( int $storeId )
+
+
Set StoreId to get impressum data for this store.
+
+
+
+
+
+ protected getStoreId( )
+
+
Getting StoreId to get proper store related information in order comments.
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Block_Imprint_Field.xhtml b/docs/api/html/classes/FireGento_MageSetup_Block_Imprint_Field.xhtml
new file mode 100644
index 00000000..16c8ec3b
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Block_Imprint_Field.xhtml
@@ -0,0 +1,143 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Block_Imprint_Field - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Block_Imprint_Field
+
+
Block to retrieve data from imprint config field.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Constructor to set config store view.
+
+
+
+
Methods
+
+
+
+ public getCountry( )
+
+
Retrieve the specific country name by the selected country code
+
+
+
+
+
+ public getWeb( bool $checkForProtocol )
+
+
Retrieve the setting "website". If parameter checkForProtocol is true, check if there is a valid protocol given, otherwise add http:// manually.
+
+
+ Parameters:
+
+ $checkForProtocol
- Flag if website url should be checked for http(s) protocol
+
+
+
+
+
+
+ public setStoreId( int $storeId )
+
+
Set StoreId to get impressum data for this store.
+
+
+
+
+
+ protected _toHtml( )
+
+
Render imprint field
+
+
+
+
+
+ protected getStoreId( )
+
+
Getting StoreId to get proper store related information in order comments.
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_FrontendController.xhtml b/docs/api/html/classes/FireGento_MageSetup_FrontendController.xhtml
new file mode 100644
index 00000000..bca11410
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_FrontendController.xhtml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_FrontendController - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_FrontendController
+
+
Adminhtml Controller for dislaying a form for some actions
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public agreementsAction( )
+
+
Shows the given agreement
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Helper_Catalog_Product_Configuration.xhtml b/docs/api/html/classes/FireGento_MageSetup_Helper_Catalog_Product_Configuration.xhtml
new file mode 100644
index 00000000..3bc2a090
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Helper_Catalog_Product_Configuration.xhtml
@@ -0,0 +1,162 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Helper_Catalog_Product_Configuration - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Helper_Catalog_Product_Configuration
+
+
Changed product configuration to add product attributes on checkout
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_finished
+
+
+
+
+ protected array
+
+ $_products
+
+
+
+
Methods
+
+
+
+ public getCustomOptions( Mage_Catalog_Model_Product_Configuration_Item_Interface $item )
+
+
Merge Attributes
+
+
+
+
+
+
+ protected _getAdditionalData( Mage_Catalog_Model_Product $product )
+
+
Retrieve the attributes which are visible on the checkout page
+
+
+ Parameters:
+
+ $product
- Product Model
+
+
+
+ Returns:
+
+ Addition data as array
+
+
+
+
+
+ protected _getAttributes( Mage_Catalog_Model_Product_Configuration_Item_Interface $item )
+
+
Retreve the product attributes
+
+
+
+
+
+
+ protected _getProduct( Mage_Catalog_Model_Product_Configuration_Item_Interface $item )
+
+
Get the product for the current quote item
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Helper_Checkout_Data.xhtml b/docs/api/html/classes/FireGento_MageSetup_Helper_Checkout_Data.xhtml
new file mode 100644
index 00000000..139778e1
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Helper_Checkout_Data.xhtml
@@ -0,0 +1,89 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Helper_Checkout_Data - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Helper_Checkout_Data
+
+
Rewrite to fetch required agreement ids.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Avoid loss of translation
+
+
+
+
Methods
+
+
+
+ public getRequiredAgreementIds( )
+
+
Get all required agreement ids
+
+
+
+
+
+ protected _getCustomerSession( )
+
+
Retrieve the customer session
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Helper_Data.xhtml b/docs/api/html/classes/FireGento_MageSetup_Helper_Data.xhtml
new file mode 100644
index 00000000..ffa123a8
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Helper_Data.xhtml
@@ -0,0 +1,98 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Helper_Data - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Helper_Data
+
+
Dummy data helper for translation issues.
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public getAgreementUrl( Mage_Checkout_Model_Agreement $agreement )
+
+
Get url of agreement view for checkout
+
+
+ Parameters:
+
+ $agreement
- Agreement
+
+
+
+ Returns:
+
+ URL for the given agreement
+
+
+
+
+
+ public getAvailableCountries( )
+
+
Get available countries
+
+
+ Returns:
+
+ All available countries
+
+
+
+
+
+ public getShippingCostUrl( )
+
+
Generate URL to configured shipping cost page, or '' if none.
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_MagesetupController.xhtml b/docs/api/html/classes/FireGento_MageSetup_MagesetupController.xhtml
new file mode 100644
index 00000000..b158a119
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_MagesetupController.xhtml
@@ -0,0 +1,74 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_MagesetupController - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_MagesetupController
+
+
Adminhtml Controller for dislaying a form for some actions
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public extensionsAction( )
+
+
Recommended extensions
+
+
+
+
+ public indexAction( )
+
+
Basic action: setup form
+
+
+
+
+ public saveAction( )
+
+
Basic action: setup save action Will be called from form, rendered in indexAction
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Config.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Config.xhtml
new file mode 100644
index 00000000..f33ac3e0
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Config.xhtml
@@ -0,0 +1,150 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Config - API Documentation
+
+
+
+
+
+
+
+
Constants
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Config
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constants
+
+ CACHE_ID = 'magesetup_config'
+ CACHE_TAG = 'magesetup_config'
+
+
Members
+
+
+
+ protected string
+
+ $_country
+
+
+
+
Constructor
+
+
+
+ public __construct( string|Varien_Simplexml_Element $sourceData )
+
+
Sets cache ID and cache tags and loads configuration
+
+
+ Parameters:
+
+ $sourceData
- XML Source Data
+
+
+
+
+
Methods
+
+
+
+ public setCountry( string $country )
+
+
Set the current country for the config
+
+
+
+
+
+
+ protected _addConfigFile( string $fileName , Mage_Core_Model_Config_Base $mergeConfig )
+
+
Add a config file to the given merge config
+
+
+ Parameters:
+
+ $fileName
- File to load
+ $mergeConfig
- Global config for merging
+
+
+
+
+
+ protected _loadConfig( )
+
+
Merge default config with config from additional xml files
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Newsletter_Observer.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Newsletter_Observer.xhtml
new file mode 100644
index 00000000..c91b0c8d
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Newsletter_Observer.xhtml
@@ -0,0 +1,60 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Newsletter_Observer - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Newsletter_Observer
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public saveSubscriberStatusHistory( Varien_Event_Observer $observer )
+
+
Saves the subscriber status change in a custom history after a subscriber was saved.
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Newsletter_Subscriber_Status.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Newsletter_Subscriber_Status.xhtml
new file mode 100644
index 00000000..e50cbbb1
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Newsletter_Subscriber_Status.xhtml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Newsletter_Subscriber_Status - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Newsletter_Subscriber_Status
+
+
Subscriber Status Model
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ protected _construct( )
+
+
Init resource model
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Observer.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Observer.xhtml
new file mode 100644
index 00000000..47c1016e
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Observer.xhtml
@@ -0,0 +1,269 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Observer - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Observer
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status.xhtml
new file mode 100644
index 00000000..c133b36a
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status.xhtml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status
+
+
Subscriber Status Resource Model
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ protected _construct( )
+
+
Init main table and id field name
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection.xhtml
new file mode 100644
index 00000000..1585178d
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection.xhtml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection
+
+
Subscriber Status Resource Collection Model
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public _construct( )
+
+
Initialize the model and resource for the collection
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup.xhtml
new file mode 100644
index 00000000..742b6278
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup.xhtml
@@ -0,0 +1,141 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Setup
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public setup( Array $params , bool $notify )
+
+
Setup MageSetup as if a user sends the adminhtml form See method _getDefaultParams for possible params
+
+
+ Parameters:
+
+ $params
- Setup params
+ $notify
- Flag if admin notifications should be added
+
+
+
+
+
+
+ protected _getAdminhtmlSession( )
+
+
Retrieve the adminhtml session for setup notifications
+
+
+
+
+
+ protected _getDefaultParams( )
+
+
Get default parameters like they are in the backend form
+
+
+
+
+
+ protected _getHelper( )
+
+
Retrieve the helper class
+
+
+
+
+
+ protected _markIndicesOutdated( )
+
+
Mark relevant indices as outdated after changing tax rates
+
+
+
+
+ protected _updateProductTaxClasses( array $params )
+
+
Update the old product tax classes to the new tax class ids
+
+
+ Parameters:
+
+ $params
- Setup params
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Abstract.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Abstract.xhtml
new file mode 100644
index 00000000..7acc1a0d
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Abstract.xhtml
@@ -0,0 +1,222 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup_Abstract - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Setup_Abstract
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected object
+
+ $_setup
+
+
+
+
+ protected object
+
+ $_connection
+
+
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Setup setup class and connection
+
+
+
+
Methods
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getTemplateContent( string $filename )
+
+
Get template content
+
+
+ Parameters:
+
+ $filename
- Template file name
+
+
+
+
+
+
+ public setConfigData( string $configPath , string $value , int|null $storeId )
+
+
Saves a system config value for the given config path and the given store id
+
+
+ Parameters:
+
+ $configPath
- Config Path
+ $value
- Value
+ $storeId
- Store ID
+
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+ protected _getConnection( )
+
+
Retrieve the database connection
+
+
+
+
+
+ protected _getSetup( )
+
+
Retrieve the Magento setup model class
+
+
+
+
+
+ protected _loadExistingModel( Mage_Core_Model_Abstract $model , string $attributeCode , string $value )
+
+
Load a model by attribute code
+
+
+ Parameters:
+
+ $model
- Collection
+ $attributeCode
- Attribute code
+ $value
- Value
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Agreements.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Agreements.xhtml
new file mode 100644
index 00000000..ef0e3808
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Agreements.xhtml
@@ -0,0 +1,251 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup_Agreements - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Setup_Agreements
+
+
Setup class for Checkout Agreements
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Setup setup class and connection
+
+
+
+
Methods
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getTemplateContent( string $filename )
+
+
Get template content
+
+
+ Parameters:
+
+ $filename
- Template file name
+
+
+
+
+
+
+ public setConfigData( string $configPath , string $value , int|null $storeId )
+
+
Saves a system config value for the given config path and the given store id
+
+
+ Parameters:
+
+ $configPath
- Config Path
+ $value
- Value
+ $storeId
- Store ID
+
+
+
+
+
+ public setup( Array $locale )
+
+
Setup Checkout Agreements
+
+
+ Parameters:
+
+ $locale
- Locale options
+
+
+
+
+
+ protected _createAgreement( array $agreementData , string $locale , boolean $override , int|null $storeId )
+
+
Collect data and create Agreement
+
+
+ Parameters:
+
+ $agreementData
- Cms page data
+ $locale
- Locale
+ $override
- Override cms page if it exists
+ $storeId
- Store Id
+
+
+
+
+
+
+ protected _getConfigAgreements( )
+
+
Get pages/default from config file
+
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+ protected _getConnection( )
+
+
Retrieve the database connection
+
+
+
+
+
+ protected _getSetup( )
+
+
Retrieve the Magento setup model class
+
+
+
+
+
+ protected _loadExistingModel( Mage_Core_Model_Abstract $model , string $attributeCode , string $value )
+
+
Load a model by attribute code
+
+
+ Parameters:
+
+ $model
- Collection
+ $attributeCode
- Attribute code
+ $value
- Value
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Cms.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Cms.xhtml
new file mode 100644
index 00000000..e5b2b8b8
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Cms.xhtml
@@ -0,0 +1,397 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup_Cms - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Setup_Cms
+
+
Setup class for CMS pages and blocks
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_footerLinks
+
+
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Setup setup class and connection
+
+
+
+
Methods
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getTemplateContent( string $filename )
+
+
Get template content
+
+
+ Parameters:
+
+ $filename
- Template file name
+
+
+
+
+
+
+ public setConfigData( string $configPath , string $value , int|null $storeId )
+
+
Saves a system config value for the given config path and the given store id
+
+
+ Parameters:
+
+ $configPath
- Config Path
+ $value
- Value
+ $storeId
- Store ID
+
+
+
+
+
+ public setup( Array $locale )
+
+
Setup Pages, Blocks and especially Footer Block
+
+
+ Parameters:
+
+ $locale
- Locale options
+
+
+
+
+
+ protected _createCmsBlock( array $blockData , string $locale , boolean $override , int|null $storeId )
+
+
Collect data and create CMS block
+
+
+ Parameters:
+
+ $blockData
- Cms block data
+ $locale
- Locale
+ $override
- Override email template if set
+ $storeId
- Store ID
+
+
+
+
+
+
+ protected _createCmsPage( array $pageData , string $locale , boolean $override , int|null $storeId )
+
+
Collect data and create CMS page
+
+
+ Parameters:
+
+ $pageData
- Cms page data
+ $locale
- Locale
+ $override
- Override email template if set
+ $storeId
- Store ID
+
+
+
+
+
+
+ protected _createFooterLinksContent( int|null $storeId )
+
+
Generate footer_links block from config data
+
+
+
+
+
+
+ protected _getConfigBlocks( )
+
+
Get blocks/default from config file
+
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+ protected _getConfigPages( )
+
+
Get pages/default from config file
+
+
+
+
+
+ protected _getConnection( )
+
+
Retrieve the database connection
+
+
+
+
+
+ protected _getDefaultBlock( string $identifier )
+
+
Retrieve the default block for the given identifier
+
+
+ Parameters:
+
+ $identifier
- Block Identifier
+
+
+
+
+
+
+ protected _getFooterLinks( int|null $storeId )
+
+
Get footer_links/default from config file
+
+
+
+
+
+
+ protected _getSetup( )
+
+
Retrieve the Magento setup model class
+
+
+
+
+
+ protected _loadExistingModel( Mage_Core_Model_Abstract $model , string $attributeCode , string $value )
+
+
Load a model by attribute code
+
+
+ Parameters:
+
+ $model
- Collection
+ $attributeCode
- Attribute code
+ $value
- Value
+
+
+
+
+
+
+ protected _updateFooterLinksBlock( array $blockData , int|null $storeId )
+
+
Update footer_links cms block
+
+
+ Parameters:
+
+ $blockData
- Cms block data
+ $storeId
- Store ID
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Email.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Email.xhtml
new file mode 100644
index 00000000..32ee5dde
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Email.xhtml
@@ -0,0 +1,357 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup_Email - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Setup_Email
+
+
Setup class for transaction emails
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_localeTemplatePath
+
+
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Setup setup class and connection
+
+
+
+
Methods
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getTemplateContent( string $filename )
+
+
Get template content
+
+
+ Parameters:
+
+ $filename
- Template file name
+
+
+
+
+
+
+ public setConfigData( string $configPath , string $value , int|null $storeId )
+
+
Saves a system config value for the given config path and the given store id
+
+
+ Parameters:
+
+ $configPath
- Config Path
+ $value
- Value
+ $storeId
- Store ID
+
+
+
+
+
+ public setup( Array $locale , bool $overwrite )
+
+
Setup Transaction Emails
+
+
+ Parameters:
+
+ $locale
- Locale options
+ $overwrite
- Flag if locale options should override existing templates
+
+
+
+
+
+ protected _addFooterBlocks( string $templateText , Array $blocks )
+
+
Add configured blocks before the second last </body> tag
+
+
+ Parameters:
+
+ $templateText
- the content of the template
+ $blocks
- all blocks that should be inserted before penultimate </table>
+
+
+
+ Returns:
+
+ the content of the template with the block before penultimate </table>
+
+
+
+
+
+ protected _createEmail( array $emailData , string $locale , boolean $override , int|null $storeId )
+
+
Create transactional email template
+
+
+ Parameters:
+
+ $emailData
- Template data
+ $locale
- Locale
+ $override
- Override email template if set
+ $storeId
- Store ID
+
+
+
+
+
+
+ protected _getConfigEmailFooters( )
+
+
Get email_footers/default from config file
+
+
+
+
+
+ protected _getConfigEmails( )
+
+
Get emails/default from config file
+
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+ protected _getConnection( )
+
+
Retrieve the database connection
+
+
+
+
+
+ protected _getFooterBlocks( array $emailData )
+
+
Get HTML blocks which should be appended to the emails
+
+
+ Parameters:
+
+ $emailData
- Email data
+
+
+
+
+
+
+ protected _getLocaleEmailPath( string $locale )
+
+
Retrieve email template path for given locale
+
+
+
+
+
+
+ protected _getSetup( )
+
+
Retrieve the Magento setup model class
+
+
+
+
+
+ protected _loadExistingModel( Mage_Core_Model_Abstract $model , string $attributeCode , string $value )
+
+
Load a model by attribute code
+
+
+ Parameters:
+
+ $model
- Collection
+ $attributeCode
- Attribute code
+ $value
- Value
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Systemconfig.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Systemconfig.xhtml
new file mode 100644
index 00000000..91ed22c3
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Systemconfig.xhtml
@@ -0,0 +1,230 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup_Systemconfig - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Setup_Systemconfig
+
+
Setup class for Tax Settings
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Setup setup class and connection
+
+
+
+
Methods
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getTemplateContent( string $filename )
+
+
Get template content
+
+
+ Parameters:
+
+ $filename
- Template file name
+
+
+
+
+
+
+ public setConfigData( string $configPath , string $value , int|null $storeId )
+
+
Saves a system config value for the given config path and the given store id
+
+
+ Parameters:
+
+ $configPath
- Config Path
+ $value
- Value
+ $storeId
- Store ID
+
+
+
+
+
+ public setup( )
+
+
Setup Tax setting
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+ protected _getConfigSystemConfig( )
+
+
Get tax calculations from config file
+
+
+
+
+
+ protected _getConnection( )
+
+
Retrieve the database connection
+
+
+
+
+
+ protected _getSetup( )
+
+
Retrieve the Magento setup model class
+
+
+
+
+
+ protected _loadExistingModel( Mage_Core_Model_Abstract $model , string $attributeCode , string $value )
+
+
Load a model by attribute code
+
+
+ Parameters:
+
+ $model
- Collection
+ $attributeCode
- Attribute code
+ $value
- Value
+
+
+
+
+
+
+ protected _updateConfigData( )
+
+
Update configuration settings
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Tax.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Tax.xhtml
new file mode 100644
index 00000000..09b103b0
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Setup_Tax.xhtml
@@ -0,0 +1,442 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Setup_Tax - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Setup_Tax
+
+
Setup class for Tax Settings
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected object
+
+ $_setup
+
+
+
+
+ protected object
+
+ $_connection
+
+
+
+
Constructor
+
+
+
+ public __construct( )
+
+
Setup setup class and connection
+
+
+
+
Methods
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getTemplateContent( string $filename )
+
+
Get template content
+
+
+ Parameters:
+
+ $filename
- Template file name
+
+
+
+
+
+
+ public setConfigData( string $configPath , string $value , int|null $storeId )
+
+
Saves a system config value for the given config path and the given store id
+
+
+ Parameters:
+
+ $configPath
- Config Path
+ $value
- Value
+ $storeId
- Store ID
+
+
+
+
+
+ public setup( )
+
+
Setup Tax setting
+
+
+
+
+ public updateProductTaxClasses( int $source , int $target )
+
+
Update the tax class of all products with specified tax class id
+
+
+ Parameters:
+
+ $source
- source tax class id
+ $target
- target tax class id
+
+
+
+
+
+ protected _createTaxCalcRate( array $taxCalcRateData )
+
+
Collect data and create tax calculation rates
+
+
+ Parameters:
+
+ $taxCalcRateData
- tax class data
+
+
+
+
+
+ protected _createTaxCalcRule( array $taxCalcRuleData )
+
+
Collect data and create tax calculation rules
+
+
+ Parameters:
+
+ $taxCalcRuleData
- tax class data
+
+
+
+
+
+ protected _createTaxCalculation( array $taxCalculationData )
+
+
Collect data and create tax calculations
+
+
+ Parameters:
+
+ $taxCalculationData
- tax class data
+
+
+
+
+
+ protected _createTaxClass( array $taxClassData )
+
+
Collect data and create tax class
+
+
+ Parameters:
+
+ $taxClassData
- tax class data
+
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+ protected _getConfigTaxCalcRates( )
+
+
Get tax calculation rates from config file
+
+
+ Returns:
+
+ Config tax calculation rates
+
+
+
+
+
+ protected _getConfigTaxCalcRules( )
+
+
Get tax calculation rules from config file
+
+
+ Returns:
+
+ Config tax calculation rules
+
+
+
+
+
+ protected _getConfigTaxCalculations( )
+
+
Get tax calculations from config file
+
+
+ Returns:
+
+ Config tax calculations
+
+
+
+
+
+ protected _getConfigTaxClasses( )
+
+
Get tax classes from config file
+
+
+
+
+
+ protected _getConfigTaxConfig( )
+
+
Get tax calculations from config file
+
+
+
+
+
+ protected _getConnection( )
+
+
Retrieve the database connection
+
+
+
+
+
+ protected _getSetup( )
+
+
Retrieve the Magento setup model class
+
+
+
+
+
+ protected _insertIntoTable( string $table , array $data )
+
+
Insert a line into a database table
+
+
+ Parameters:
+
+ $table
- Table in which the given data should be inserted
+ $data
- Insert data
+
+
+
+
+
+ protected _loadExistingModel( Mage_Core_Model_Abstract $model , string $attributeCode , string $value )
+
+
Load a model by attribute code
+
+
+ Parameters:
+
+ $model
- Collection
+ $attributeCode
- Attribute code
+ $value
- Value
+
+
+
+
+
+
+ protected _truncateTable( string $table )
+
+
Truncate a database table
+
+
+ Parameters:
+
+ $table
- Table which should be truncated
+
+
+
+
+
+ protected _updateConfigData( )
+
+
Update configuration settings
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Source_AgreementType.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Source_AgreementType.xhtml
new file mode 100644
index 00000000..91b834a9
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Source_AgreementType.xhtml
@@ -0,0 +1,98 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Source_AgreementType - API Documentation
+
+
+
+
+
+
+
+
Constants
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Source_AgreementType
+
+
Source model for attribute "agreement_type"
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constants
+
+ AGREEMENT_TYPE_CHECKOUT = 0
+ AGREEMENT_TYPE_CUSTOMER = 1
+ AGREEMENT_TYPE_BOTH = 2
+ AGREEMENT_TYPE_NOWHERE = 3
+
+
Methods
+
+
+
+ public getOptionArray( )
+
+
+
+
+ Returns:
+
+ Agreement types as option hash
+
+
+
+
+
+ public toOptionArray( )
+
+
Options getter
+
+
+ Returns:
+
+ Agreement types as option array
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Source_Cms_Block.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Cms_Block.xhtml
new file mode 100644
index 00000000..6ef321ef
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Cms_Block.xhtml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Source_Cms_Block - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Source_Cms_Block
+
+
CMS Source model for configuration dropdown of CMS static blocks
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_options
+
+
+
+
Methods
+
+
+
+ public getAllOptions( )
+
+
Get all options as array
+
+
+ Returns:
+
+ Blocks as option array
+
+
+
+
+
+ public toOptionArray( )
+
+
Return option array
+
+
+ Returns:
+
+ Blocks as option array
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Source_Cms_Page.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Cms_Page.xhtml
new file mode 100644
index 00000000..a8201ffe
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Cms_Page.xhtml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Source_Cms_Page - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Source_Cms_Page
+
+
CMS Source model for configuration dropdown of CMS pages
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_options
+
+
+
+
Methods
+
+
+
+ public getAllOptions( )
+
+
Get all options as array
+
+
+ Returns:
+
+ Pages as option array
+
+
+
+
+
+ public toOptionArray( )
+
+
Return option array
+
+
+ Returns:
+
+ Pages as option array
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_DynamicType.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_DynamicType.xhtml
new file mode 100644
index 00000000..08778dd7
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_DynamicType.xhtml
@@ -0,0 +1,60 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Source_Tax_DynamicType - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Source_Tax_DynamicType
+
+
CMS Source model for configuration dropdown of CMS pages
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public toOptionArray( )
+
+
Options getter
+
+
+ Returns:
+
+ Dynamic types as option array
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass.xhtml
new file mode 100644
index 00000000..5a551433
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass.xhtml
@@ -0,0 +1,161 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass
+
+
Tax Source model for new tax classes, possibly not created yet
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected array
+
+ $_options
+
+
+
+
+ protected string
+
+ $_defaultOption
+
+
+
+
Methods
+
+
+
+ public getAllOptions( )
+
+
Get all options as array
+
+
+ Returns:
+
+ New product tax classes as option array
+
+
+
+
+
+ public getConfigData( )
+
+
Get config.xml data
+
+
+
+
+
+ public getDefaultOption( )
+
+
Get default tax class
+
+
+ Returns:
+
+ Default tax class option
+
+
+
+
+
+ public toOptionArray( )
+
+
Return option array
+
+
+ Returns:
+
+ New product tax classes as option array
+
+
+
+
+
+ protected _getConfigNode( string $node , string|null $childNode )
+
+
Get config.xml data
+
+
+ Parameters:
+
+ $node
- xml node
+ $childNode
- if set, child node of the first node
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_ProductTaxClass.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_ProductTaxClass.xhtml
new file mode 100644
index 00000000..77c24fe5
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Source_Tax_ProductTaxClass.xhtml
@@ -0,0 +1,66 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Source_Tax_ProductTaxClass - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Model_Source_Tax_ProductTaxClass
+
+
Tax Source model for new tax classes, possibly not created yet
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public getAllOptions( bool $withEmpty )
+
+
Retrieve all product tax classes as array
+
+
+ Parameters:
+
+ $withEmpty
- Flag if an empty option should be prepended to the option array
+
+
+
+ Returns:
+
+ Product tax class option array
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Model_Tax_Config.xhtml b/docs/api/html/classes/FireGento_MageSetup_Model_Tax_Config.xhtml
new file mode 100644
index 00000000..d04bb4ac
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Model_Tax_Config.xhtml
@@ -0,0 +1,106 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Model_Tax_Config - API Documentation
+
+
+
+
+
+
+
+
Constants
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Model_Tax_Config
+
+
Tax config model with new shipping tax class calculation
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Constants
+
+ XML_PATH_SHIPPING_TAX_ON_PRODUCT_TAX = 'tax/classes/shipping_tax_on_product_tax'
+ USE_HIGHTES_TAX_ON_PRODUCTS = 1
+ USE_TAX_DEPENDING_ON_PRODUCT_VALUES = 2
+
+
Methods
+
+
+
+ public getShippingTaxClass( Mage_Core_Model_Store $store )
+
+
Get tax class id specified for shipping tax estimation based on highest product tax rate of the products in the current customer quote.
+
+
+
+ Returns:
+
+ Shipping tax class id
+
+
+
+
+
+ protected _loadTaxCalculationRate( Mage_Sales_Model_Quote_Item $item )
+
+
Gets tax percents for current sales quote item
+
+
+
+ Returns:
+
+ Tax percent for the given quote item
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Test_Config_Main.xhtml b/docs/api/html/classes/FireGento_MageSetup_Test_Config_Main.xhtml
new file mode 100644
index 00000000..be75650b
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Test_Config_Main.xhtml
@@ -0,0 +1,104 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Test_Config_Main - API Documentation
+
+
+
+
+
+
+
+
+
\ FireGento_MageSetup_Test_Config_Main
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Methods
+
+
+
+ public testBlockAliases( )
+
+
Check if the block aliases are returning the correct class names
+
+
+
+
+ public testGermanSetupNotActive( )
+
+
Check that GermanSetup is not active
+
+
+
+
+ public testHelperAliases( )
+
+
Check if the helper aliases are returning the correct class names
+
+
+
+
+ public testModelAliases( )
+
+
Check if the helper aliases are returning the correct class names
+
+
+
+
+ public testModuleConfig( )
+
+
Check it the installed module has the correct module version
+
+
+
+
+ public testRewrites( )
+
+
Check if the rewrites are returning the correct class names
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Test_Model_Source_AgreementType.xhtml b/docs/api/html/classes/FireGento_MageSetup_Test_Model_Source_AgreementType.xhtml
new file mode 100644
index 00000000..46f79f15
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Test_Model_Source_AgreementType.xhtml
@@ -0,0 +1,92 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Test_Model_Source_AgreementType - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Test_Model_Source_AgreementType
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected object
+
+ $_model
+
+
+
+
Methods
+
+
+
+ public testGetOptionArray( )
+
+
Test the getOptionArray method
+
+
+
+
+ public testToOptionArray( )
+
+
Test the toOptionArray method
+
+
+
+
+ protected setUp( )
+
+
Sets up the model class
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/classes/FireGento_MageSetup_Test_Model_Source_Tax_DynamicType.xhtml b/docs/api/html/classes/FireGento_MageSetup_Test_Model_Source_Tax_DynamicType.xhtml
new file mode 100644
index 00000000..22d2b3aa
--- /dev/null
+++ b/docs/api/html/classes/FireGento_MageSetup_Test_Model_Source_Tax_DynamicType.xhtml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ FireGento_MageSetup - FireGento_MageSetup_Test_Model_Source_Tax_DynamicType - API Documentation
+
+
+
+
+
+
+
+
Members
+
+
Methods
+
+
+
+
\ FireGento_MageSetup_Test_Model_Source_Tax_DynamicType
+
+
+ Author: FireGento Team <team@firegento.com>
+ Copyright: 2013 FireGento Team (http://www.firegento.de). All rights served.
+ License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+
+
Members
+
+
+
+ protected object
+
+ $_model
+
+
+
+
Methods
+
+
+
+ public testToOptionArray( )
+
+
Test the toOptionArray method
+
+
+
+
+ protected setUp( )
+
+
Sets up the model class
+
+
+
+
+
+
+
+
diff --git a/docs/api/html/css/normalize.css b/docs/api/html/css/normalize.css
new file mode 100644
index 00000000..be675053
--- /dev/null
+++ b/docs/api/html/css/normalize.css
@@ -0,0 +1,326 @@
+/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
+/* edited by Jens Grochtdreis */
+
+/* ==========================================================================
+ Base
+ ========================================================================== */
+
+/*
+ * 1. Sets default font family to sans-serif.
+ * 2. Prevents iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+ font-family: sans-serif; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+ -ms-text-size-adjust: 100%; /* 2 */
+}
+
+/*
+ * Removes default margin.
+ */
+
+body {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Links
+ ========================================================================== */
+
+/*
+ * Addresses `outline` inconsistency between Chrome and other browsers.
+ */
+
+a:focus {
+ outline: thin dotted;
+}
+
+/*
+ * Improves readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* ==========================================================================
+ Typography
+ ========================================================================== */
+
+/*
+ * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
+ * Safari 5, and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+}
+
+/*
+ * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/*
+ * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+/*
+ * Addresses styling not present in Safari 5 and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/*
+ * Addresses styling not present in IE 8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+
+/*
+ * Corrects font family set oddly in Safari 5 and Chrome.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, serif;
+ font-size: 1em;
+}
+
+/*
+ * Improves readability of pre-formatted text in all browsers.
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/*
+ * Sets consistent quote types.
+ */
+
+q {
+ quotes: "\201C" "\201D" "\2018" "\2019";
+}
+
+/*
+ * Addresses inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/*
+ * Prevents `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* ==========================================================================
+ Embedded content
+ ========================================================================== */
+
+/*
+ * Removes border when inside `a` element in IE 8/9.
+ */
+
+img {
+ border: 0;
+}
+
+/*
+ * Corrects overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* ==========================================================================
+ Figures
+ ========================================================================== */
+
+/*
+ * Addresses margin not present in IE 8/9 and Safari 5.
+ */
+
+figure {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Forms
+ ========================================================================== */
+
+/*
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/*
+ * 1. Corrects color not being inherited in IE 8/9.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/*
+ * 1. Corrects font family not being inherited in all browsers.
+ * 2. Corrects font size not being inherited in all browsers.
+ * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
+ */
+
+button,
+input,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 2 */
+ margin: 0; /* 3 */
+}
+
+/*
+ * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+button,
+input {
+ line-height: normal;
+}
+
+/*
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Corrects inability to style clickable `input` types in iOS.
+ * 3. Improves usability and consistency of cursor style between image-type
+ * `input` and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+}
+
+/*
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+input[disabled] {
+ cursor: default;
+}
+
+/*
+ * 1. Addresses box sizing set to `content-box` in IE 8/9.
+ * 2. Removes excess padding in IE 8/9.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/*
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/*
+ * Removes inner padding and search cancel button in Safari 5 and Chrome
+ * on OS X.
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/*
+ * Removes inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/*
+ * 1. Removes default vertical scrollbar in IE 8/9.
+ * 2. Improves readability and alignment in all browsers.
+ */
+
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+/* ==========================================================================
+ Tables
+ ========================================================================== */
+
+/*
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
diff --git a/docs/api/html/css/oldie.css b/docs/api/html/css/oldie.css
new file mode 100644
index 00000000..346f5d49
--- /dev/null
+++ b/docs/api/html/css/oldie.css
@@ -0,0 +1,23 @@
+/* for IE8 and below */
+/* convert rgba-colours in the background into hex with: http://beijingyoung.com/articles/rgba-argb-converter/ */
+/* strip-off the "a" rgba if it is only "color" */
+
+.clearfix { *height:1%; } /* trigger hasLayout for IE6 + 7 */
+h1, h2, h3 { color: rgb(0,0,0);}
+
+.topbar {
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#BF000000', EndColorStr='#BF000000');
+ zoom: 1!important;
+}
+
+.btn {
+ *display: inline;
+ *zoom: 1;
+ background-color: transparent\9;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+}
+.btn:hover,
+.btn:focus {
+ background-color: transparent\9;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
+}
\ No newline at end of file
diff --git a/docs/api/html/css/styles.css b/docs/api/html/css/styles.css
new file mode 100644
index 00000000..8d3fe957
--- /dev/null
+++ b/docs/api/html/css/styles.css
@@ -0,0 +1,251 @@
+/* styling basics */
+html {padding: 20px 0; background-color: #efefef;}
+body {font-family: Arial, sans-serif; font-size: 100.01%;}
+
+/* clearfix */
+.clearfix:after { clear:both; content:"."; display:block; font-size:0; height:0; visibility:hidden; }
+.clearfix { display:block; } /* extra for Safari */
+
+
+h1, h2, h3, h4, h5, h6 {font-family: Verdana, Arial, Helvetica, sans-serif; }
+
+/* Topbar */
+.topbar { margin: -20px -20px 2em -20px; padding: 1em 0;}
+.topbar a { text-decoration: none;}
+.topbar a:hover, .topbar a:focus { text-decoration: underline;}
+.topbar h1 { float: left; font-size:1em; margin:0 0 0 2em;}
+.topbar .nav { list-style-type:none; float:right; margin:0 2em 0 0;}
+.topbar .nav li { float:left;}
+
+/* page-layout */
+.wrapper {
+ width: 90%;
+ max-width: 1200px;
+ padding: 20px;
+ margin: 40px auto 0 auto;
+ background: #fff;
+ box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+}
+
+.indexcontent {margin: 1em auto; width: 90%;}
+
+.navigation {float: left;width: 200px;}
+.navigation ul, .navigation li {
+ list-style-type: none;
+ padding-left: 0;
+ margin-left: 0;
+}
+.navigation a {
+ display: block;
+ border-bottom: 1px solid #cecece;
+ margin-bottom: 0.25em;
+ padding: 0.5em 0;
+ text-decoration: none;
+ color: inherit;
+ word-wrap: break-word;
+}
+
+.navigation h3 {
+ clear: both;
+}
+
+.navigation a:hover, .navigation a:focus {
+ padding-left: 0.75em;
+ background-color:#f5f5f5;
+}
+
+.content {margin-left: 250px;}
+
+pre {
+ display:block;
+ padding:20px;
+ margin:0 0 1.5em 0;
+ font-size: 0.8em;
+ background-color:#f5f5f5;
+ border:1px solid #ccc;
+ border-radius:3px;
+ white-space:pre;
+ white-space:pre-wrap;
+ word-wrap:break-word;
+ max-width: 700px;
+}
+
+/* ===== Buttons */
+.btn {
+ display: inline-block;
+ padding: 4px 14px;
+ margin-bottom: 0;
+ line-height: 1.2;
+ color: #333;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ vertical-align: middle;
+ background: #e6e6e6;
+ background: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+ background: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+ background: -o-linear-gradient(top, #ffffff, #e6e6e6);
+ background: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+ background: linear-gradient(to bottom, #ffffff, #e6e6e6);
+ border: 1px solid #bbbbbb;
+ border-color: #e6e6e6 #e6e6e6 #a2a2a2 #bfbfbf;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ text-decoration: none;
+}
+
+.btn:hover,
+.btn:focus {
+ background: #e6e6e6;
+ background: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
+ background: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
+ background: -o-linear-gradient(top, #e6e6e6, #ffffff);
+ background: -moz-linear-gradient(top, #e6e6e6, #ffffff);
+ background: linear-gradient(to bottom, #e6e6e6, #ffffff);
+}
+
+.btn:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+.btn:active {
+ background-color: #e6e6e6;
+ outline: 0;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn.large {
+ padding: 9px 14px;
+}
+
+/* ========= linklists */
+
+.linklist {list-style-type: none;padding-left: 0;margin-left: 0;}
+.linklist li {margin: 0 0 0.3em 0;}
+.linkbox {float: left;width: 30%;margin-right: 3%;}
+
+
+/* ======== inheritance */
+ul.inheritance {list-style-type:none;}
+ul.inheritance li:before {content:"↪ ";}
+ul.inheritance li:first-child:before {content:"";}
+/* looks strange but is CSS3-selector simulated for oldIE :-) */
+ul.inheritance li + li + li {margin-left: 1em;}
+ul.inheritance li + li + li + li {margin-left: 1.5em;}
+ul.inheritance li + li + li + li + li {margin-left: 2em;}
+ul.inheritance li + li + li + li + li + li {margin-left: 2.5em;}
+ul.inheritance li + li + li + li + li + li + li {margin-left: 3em;}
+
+/* ======== method:param, method:return, method:trows */
+ul.param, ul.return, ul.throws {list-style-type:none;}
+h4.param {margin-bottom: 0px;}
+
+/* ======== method:return, method:trows */
+h4.return, h4.throws {margin-top: 0px; margin-bottom: 0px;}
+
+/* ========= Footer */
+.footer {clear:both;margin:2em 0 1em 0;padding:0.5em 1em;border-top:2px solid #cecece;font-size: 0.85em;}
+
+/* ===========
+ the content ========================================== */
+
+/* different labels */
+.label {padding: 0.25em 0.5em; border-radius: 3px;text-transform: uppercase;font-size: 0.5em; color: #fff;}
+ .private {background-color: #a20000;}
+ .protected {background-color: #efba00;}
+ .public {background-color: #00b25c;}
+
+/* the name of the member-variable */
+.var-member {font-weight: bold;}
+
+/* which variable type? */
+.var-type {font-style:italic;}
+
+.label, .var-member, .var-type {display: inline-block;margin-right: 0.5em;}
+
+/* short description of the variable */
+.var-desc { margin-top: 0.25em;}
+
+/* optional long description of the variable */
+.var-longdesc{ background-color:#f5f5f5; border:1px solid #ccc; padding:0.4em; margin-top:0.25em;}
+
+/* list with infos and with vars */
+.extendlist, .varlist, .varinfos {list-style-type: none;}
+.varinfos { border-bottom: 1px solid #cecece; padding-bottom: 1em; margin-bottom: 1em;}
+
+@media only screen and (max-width: 800px) {
+ .navigation, .content {float: none; position: relative; margin-left: 0; width: auto;}
+ .navigation h2, .content {clear: both;}
+ .navigation ul, .navigation li {float: left;}
+ .navigation h2 {margin-bottom: 0;}
+ .navigation ul {overflow: hidden;margin-top: 0;}
+ .navigation a {border-bottom: none; margin-right: 0.5em;padding: 0.4em 0.75em; background-color: #f4f4f4;border-radius: 5px;}
+ .navigation a:hover, .navigation a:focus {background-color: #cecece;}
+ .linkbox {float: none;width: auto; margin-right: 0;}
+}
+
+
+/* ==================
+ animations ======================================================= */
+
+@media only screen and (min-width: 801px) {
+ .navigation a {
+ -webkit-transition: padding-left 0.2s ease-in, background-color 0.2s ease-in;
+ -moz-transition: padding-left 0.2s ease-in, background-color 0.2s ease-in;
+ -o-transition: padding-left 0.2s ease-in, background-color 0.2s ease-in;
+ transition: padding-left 0.2s ease-in, background-color 0.2s ease-in;
+ }
+}
+
+h4:target {
+ -webkit-animation: target-fade 2s 1;
+ -moz-animation: target-fade 2s 1;
+ -ms-animation: target-fade 2s 1;
+ animation: target-fade 2s 1;
+}
+
+@-webkit-keyframes target-fade {
+ 0% { background-color: #ffffff;}
+ 75% { background-color: #f7d484;}
+ 100% { background-color: #ffffff;}
+}
+
+@-moz-keyframes target-fade {
+ 0% { background-color: #ffffff;}
+ 75% { background-color: #f7d484;}
+ 100% { background-color: #ffffff;}
+}
+
+@-ms-keyframes target-fade {
+ 0% { background-color: #ffffff;}
+ 75% { background-color: #f7d484;}
+ 100% { background-color: #ffffff;}
+}
+
+@keyframes target-fade {
+ 0% { background-color: #ffffff;}
+ 75% { background-color: #f7d484;}
+ 100% { background-color: #ffffff;}
+}
+
+
+/* ===================
+ main colours ======================================== */
+
+/* if the background-color is rgba please provide an alternative for oldIE in oldie.css */
+h1, h2, h3 {color: rgba(255,147,30,1);}
+.topbar { background-color: rgba(33,40,48,0.75);}
+.topbar a {color: #fff;}
+
+.extendlist a, .linklist a, .var-member a {color: #354225;}
+
+.extendlist a:hover, .extendlist a:focus,
+.linklist a:hover, .linklist a:focus,
+.var-member a:hover, .var-member a:focus {color: #5c7340;}
+
+.param-type {
+ font-weight:normal;
+}
diff --git a/docs/api/html/index.xhtml b/docs/api/html/index.xhtml
new file mode 100644
index 00000000..c0b8b255
--- /dev/null
+++ b/docs/api/html/index.xhtml
@@ -0,0 +1,168 @@
+
+
+
+
+ FireGento_MageSetup - API Documentation
+
+
+
+
+
+
+
+
FireGento_MageSetup
+
Welcome to the API documentation page. Please select one of the listed classes, interfaces or traits to learn more about the indivdual item. You can navigate back to this page by use of the top navigation bar.
+
+
Classes
+
+
+
+
Interfaces
+
No interfaces defined
+
+
+
Traits
+
No traits defined
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Adminhtml_NewsletterController.xml b/docs/api/xml/classes/FireGento_MageSetup_Adminhtml_NewsletterController.xml
new file mode 100644
index 00000000..1632e822
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Adminhtml_NewsletterController.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Magesetup.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Magesetup.xml
new file mode 100644
index 00000000..c47c920d
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Magesetup.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status.xml
new file mode 100644
index 00000000..a9b7324c
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid.xml
new file mode 100644
index 00000000..0c367369
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Notifications.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Notifications.xml
new file mode 100644
index 00000000..d1eb1468
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Adminhtml_Notifications.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price.xml
new file mode 100644
index 00000000..7eced12b
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract.xml
new file mode 100644
index 00000000..40b1249b
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Catalog_Product_Price.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Catalog_Product_Price.xml
new file mode 100644
index 00000000..4c804cdb
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Catalog_Product_Price.xml
@@ -0,0 +1,107 @@
+
+
+
+
+ Contains the normal price.phtml rendering and additionally a configured static block.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Catalog_Product_Price_Abstract.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Catalog_Product_Price_Abstract.xml
new file mode 100644
index 00000000..6bd3b032
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Catalog_Product_Price_Abstract.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Checkout_Agreements.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Checkout_Agreements.xml
new file mode 100644
index 00000000..13726ba3
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Checkout_Agreements.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Checkout_Information.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Checkout_Information.xml
new file mode 100644
index 00000000..d043c20e
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Checkout_Information.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Customer_Account_Agreements.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Customer_Account_Agreements.xml
new file mode 100644
index 00000000..827d775d
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Customer_Account_Agreements.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Ga.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Ga.xml
new file mode 100644
index 00000000..09ef8546
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Ga.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Imprint_Content.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Imprint_Content.xml
new file mode 100644
index 00000000..bed01c40
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Imprint_Content.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Block_Imprint_Field.xml b/docs/api/xml/classes/FireGento_MageSetup_Block_Imprint_Field.xml
new file mode 100644
index 00000000..9bb3c10b
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Block_Imprint_Field.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_FrontendController.xml b/docs/api/xml/classes/FireGento_MageSetup_FrontendController.xml
new file mode 100644
index 00000000..f06922c7
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_FrontendController.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Helper_Catalog_Product_Configuration.xml b/docs/api/xml/classes/FireGento_MageSetup_Helper_Catalog_Product_Configuration.xml
new file mode 100644
index 00000000..832df355
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Helper_Catalog_Product_Configuration.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Helper_Checkout_Data.xml b/docs/api/xml/classes/FireGento_MageSetup_Helper_Checkout_Data.xml
new file mode 100644
index 00000000..a6cafba0
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Helper_Checkout_Data.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Helper_Data.xml b/docs/api/xml/classes/FireGento_MageSetup_Helper_Data.xml
new file mode 100644
index 00000000..bb9df5d7
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Helper_Data.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_MagesetupController.xml b/docs/api/xml/classes/FireGento_MageSetup_MagesetupController.xml
new file mode 100644
index 00000000..733cc02a
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_MagesetupController.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Config.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Config.xml
new file mode 100644
index 00000000..858ace42
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Config.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Newsletter_Observer.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Newsletter_Observer.xml
new file mode 100644
index 00000000..4dbc9132
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Newsletter_Observer.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Newsletter_Subscriber_Status.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Newsletter_Subscriber_Status.xml
new file mode 100644
index 00000000..cd5c3f04
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Newsletter_Subscriber_Status.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Observer.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Observer.xml
new file mode 100644
index 00000000..8894a111
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Observer.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Filters all agreements against the Magento template filter. This enables the Magento
+administrator define a cms static block as the content of the checkout agreements..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status.xml
new file mode 100644
index 00000000..374351e5
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection.xml
new file mode 100644
index 00000000..ff02cb52
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup.xml
new file mode 100644
index 00000000..6e866e6b
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Abstract.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Abstract.xml
new file mode 100644
index 00000000..16fe1800
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Abstract.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Agreements.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Agreements.xml
new file mode 100644
index 00000000..5e5167cf
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Agreements.xml
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Cms.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Cms.xml
new file mode 100644
index 00000000..1fc6f78c
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Cms.xml
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Email.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Email.xml
new file mode 100644
index 00000000..7e3010f6
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Email.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Systemconfig.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Systemconfig.xml
new file mode 100644
index 00000000..41ecc6a2
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Systemconfig.xml
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Tax.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Tax.xml
new file mode 100644
index 00000000..23e97639
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Setup_Tax.xml
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Source_AgreementType.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_AgreementType.xml
new file mode 100644
index 00000000..7cecf5b0
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_AgreementType.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Cms_Block.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Cms_Block.xml
new file mode 100644
index 00000000..5e71e017
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Cms_Block.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Cms_Page.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Cms_Page.xml
new file mode 100644
index 00000000..532d925f
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Cms_Page.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_DynamicType.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_DynamicType.xml
new file mode 100644
index 00000000..d359a02e
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_DynamicType.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass.xml
new file mode 100644
index 00000000..278cc1ab
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_NewProductTaxClass.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_ProductTaxClass.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_ProductTaxClass.xml
new file mode 100644
index 00000000..21328a43
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Source_Tax_ProductTaxClass.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Model_Tax_Config.xml b/docs/api/xml/classes/FireGento_MageSetup_Model_Tax_Config.xml
new file mode 100644
index 00000000..735667d7
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Model_Tax_Config.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Test_Config_Main.xml b/docs/api/xml/classes/FireGento_MageSetup_Test_Config_Main.xml
new file mode 100644
index 00000000..b68e8b9b
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Test_Config_Main.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Test_Model_Source_AgreementType.xml b/docs/api/xml/classes/FireGento_MageSetup_Test_Model_Source_AgreementType.xml
new file mode 100644
index 00000000..3360bc9a
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Test_Model_Source_AgreementType.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/classes/FireGento_MageSetup_Test_Model_Source_Tax_DynamicType.xml b/docs/api/xml/classes/FireGento_MageSetup_Test_Model_Source_Tax_DynamicType.xml
new file mode 100644
index 00000000..c58f30d5
--- /dev/null
+++ b/docs/api/xml/classes/FireGento_MageSetup_Test_Model_Source_Tax_DynamicType.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/index.xml b/docs/api/xml/index.xml
new file mode 100644
index 00000000..31a9eca6
--- /dev/null
+++ b/docs/api/xml/index.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/api/xml/source.xml b/docs/api/xml/source.xml
new file mode 100644
index 00000000..53554363
--- /dev/null
+++ b/docs/api/xml/source.xml
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/features/features.markdown b/docs/features/features.markdown
new file mode 100644
index 00000000..babfcb05
--- /dev/null
+++ b/docs/features/features.markdown
@@ -0,0 +1,117 @@
+FireGento_MageSetup - Features
+=====================
+##Contents
+- [Setup features](#setup-features)
+- [Backend features](#backend-features)
+- [Frontend features](#frontend-features)
+
+## Setup Features
+### General
+- Display a hint to fill out configuration form after first login
+
+- Supports the following countries right now:
+ * Austria
+ * France
+ * Germany
+ * Italy
+ * Russia
+ * Switzerland
+ * United Kingdom
+- **Important:** After form submission, the form still displays the default values. The settings have been changed though
+
+### Configuration Setup
+
+
+- Choose a country which will be configured as shipping source
+- Set country specific configuration settings (i.e. newsletter confirmation
+
+### Tax Setup
+
+
+- Tax settings for the selected country (see **Configuration Setup**)
+- All tax classes, rates and rules are deleted in the process and new ones are created
+- For EU countries, shipping to all EU countries is supported
+- You can select new tax classes for your products (if you have any yet) and customer groups depending on the old tax classes
+
+### CMS Setup
+
+
+- Setup preconfigured, language dependant CMS pages:
+ * 404 error
+ * Imprint
+ * Payment Methods
+ * Privacy
+ * Shipping Methods
+ * Order Overview
+ * Business Terms
+ * Declaration of Revocation
+- Setup CMS static blocks (preconfigured, language dependant):
+ * Business Terms (is used by static page with same name, checkout agreement and as email content for some emails)
+ * Declaration of Revocation (is used by static page with same name, checkout agreement and as email content for some emails)
+ * Footer Links (including links to above pages)
+- Setup Checkout Agreements (preconfigured, language dependant)
+ * Business Terms
+ * Declaration of Revocation
+
+You can choose a different language for every store view.
+
+### Email Setup
+
+
+- Setup Emails
+ * Choose a different language for every store view
+ * Emails are taken from installed language packs
+ * All emails are created as transational emails and can thus be edited in the Magento admin panel
+ * Some blocks are added automatically to certain emails (mostly "New Order" and "New customer"):
+ - Store information (template can be found at **/app/design/frontend/base/default/template/magesetup/imprint/email_footer.phtml**)
+ - Business terms (taken from created static block)
+ - Declaration of Revocation (taken from created static block)
+
+## Backend Features
+### New configuration fields for shop information (imprint)
+- Can be found in **System -> Configuration -> General -> Imprint**
+- Displays entered information in cms page "imprint" and in email footer
+
+### Checkout Agreements
+- Option to display checkout agreements on checkout, and customer registration, on both or none
+- Option to make checkout agreements required (display checkbox on frontend) or optional (does not display checkbox, just the test)
+
+
+### Newsletter Subscribers Status History
+- Store all newsletter subscription statusses of all subscribers
+- Document all status changes in order to be able to prove subscriptions and unsubscriptions
+
+
+### Auto-generate meta data for products
+- Generate meta title from product name
+- Generate meta keywords from category names
+- Generate meta description from short description, (if empty) description or (if still empty) category names
+
+
+## Frontend Features
+### Info Block below Prices
+- Display a block below prices on product list and product view pages
+
+- Configure via backend in **System -> Configuration -> Catalog -> Price**
+
+
+### Display additional attributes in cart and on checkout review page
+- Can be selected by attribute in **Catalog -> Attributes -> Manage Attributes**
+
+
+
+### Shipping Costs block on cart page
+- Block can be replaced with a simple link to the shipping costs cms page
+
+- Can be configured in **System -> Configuration -> Checkout -> Shopping cart -> Hide estimated shipping costs in cart**
+
+### Redesign Checkout review page
+- 
+ Regrouping for better overview and due to legal issues
+- Display additional text (can be configured in **System -> Configuration -> Checkout -> Checkout Options -> Display Additional Information**)
+
+### Dynamic Shipping Tax Class Calculation
+- 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
+
\ No newline at end of file
diff --git a/docs/features/images/attribute-display-checkout-cart.png b/docs/features/images/attribute-display-checkout-cart.png
new file mode 100644
index 00000000..8ee6f878
Binary files /dev/null and b/docs/features/images/attribute-display-checkout-cart.png differ
diff --git a/docs/features/images/attribute-display-checkout.png b/docs/features/images/attribute-display-checkout.png
new file mode 100644
index 00000000..ca1b46d1
Binary files /dev/null and b/docs/features/images/attribute-display-checkout.png differ
diff --git a/docs/features/images/cart-shipping-costs.png b/docs/features/images/cart-shipping-costs.png
new file mode 100644
index 00000000..a982beeb
Binary files /dev/null and b/docs/features/images/cart-shipping-costs.png differ
diff --git a/docs/features/images/checkout-agreements.png b/docs/features/images/checkout-agreements.png
new file mode 100644
index 00000000..d5f3de46
Binary files /dev/null and b/docs/features/images/checkout-agreements.png differ
diff --git a/docs/features/images/checkout-review.png b/docs/features/images/checkout-review.png
new file mode 100644
index 00000000..04118f55
Binary files /dev/null and b/docs/features/images/checkout-review.png differ
diff --git a/docs/features/images/install-hint.png b/docs/features/images/install-hint.png
new file mode 100644
index 00000000..f280aba4
Binary files /dev/null and b/docs/features/images/install-hint.png differ
diff --git a/docs/features/images/newsletter-history.png b/docs/features/images/newsletter-history.png
new file mode 100644
index 00000000..255be9a6
Binary files /dev/null and b/docs/features/images/newsletter-history.png differ
diff --git a/docs/features/images/price-configuration.png b/docs/features/images/price-configuration.png
new file mode 100644
index 00000000..a2bb9429
Binary files /dev/null and b/docs/features/images/price-configuration.png differ
diff --git a/docs/features/images/price-text-list.png b/docs/features/images/price-text-list.png
new file mode 100644
index 00000000..21cacf85
Binary files /dev/null and b/docs/features/images/price-text-list.png differ
diff --git a/docs/features/images/price-text-view.png b/docs/features/images/price-text-view.png
new file mode 100644
index 00000000..75201a31
Binary files /dev/null and b/docs/features/images/price-text-view.png differ
diff --git a/docs/features/images/product-meta-autogenerate.png b/docs/features/images/product-meta-autogenerate.png
new file mode 100644
index 00000000..6a9a5a32
Binary files /dev/null and b/docs/features/images/product-meta-autogenerate.png differ
diff --git a/docs/features/images/setup-cms.png b/docs/features/images/setup-cms.png
new file mode 100644
index 00000000..a8841a27
Binary files /dev/null and b/docs/features/images/setup-cms.png differ
diff --git a/docs/features/images/setup-configuration.png b/docs/features/images/setup-configuration.png
new file mode 100644
index 00000000..70b47687
Binary files /dev/null and b/docs/features/images/setup-configuration.png differ
diff --git a/docs/features/images/setup-email.png b/docs/features/images/setup-email.png
new file mode 100644
index 00000000..b634f579
Binary files /dev/null and b/docs/features/images/setup-email.png differ
diff --git a/docs/features/images/setup-overview.png b/docs/features/images/setup-overview.png
new file mode 100644
index 00000000..c7a07c68
Binary files /dev/null and b/docs/features/images/setup-overview.png differ
diff --git a/docs/features/images/setup-tax.png b/docs/features/images/setup-tax.png
new file mode 100644
index 00000000..17113133
Binary files /dev/null and b/docs/features/images/setup-tax.png differ
diff --git a/docs/features/images/shipping-tax-class.png b/docs/features/images/shipping-tax-class.png
new file mode 100644
index 00000000..374a85fc
Binary files /dev/null and b/docs/features/images/shipping-tax-class.png differ
diff --git a/docs/features/overview.markdown b/docs/features/overview.markdown
new file mode 100644
index 00000000..236bb168
--- /dev/null
+++ b/docs/features/overview.markdown
@@ -0,0 +1,67 @@
+FireGento_MageSetup - the fast way to setup your Magento store
+====================================================
+MageSetup is a **free community module** for Magento which simplifies the process to setup your Magento store.
+Its broad set of features makes the shops comply to most national laws.
+It has evolved from **GermanSetup**, a module which has grown very famous in Germany, Austria and Switzerland. Germany is known to have very rigid laws which was the foremost reason to start this module.
+
+What does it do?
+----------------
+MageSetup provides a new backend form which allows you to make a few decisions, mainly which country you are shipping from and which language(s) you are using. When submitting the form, FireGento_MageSetup does the following:
+
+* Setup **tax** configuration for worldwide shipping. It sets up all necessary **product** and **customer tax classes** as well as all tax rates and calculation rules.
+ In particular, the complicated rules for shipping from a EU country are supported, so end customers from another EU country got to pay taxes while companies with a VAT ID don't.
+* Create a few **CMS pages** and **static blocks** like imprint, business terms or revocation. The contents of these blocks can be used for checkout agreements or in emails as well.
+* Setup **email templates** which allows the admin to adjust the shop emails further. An email footer with shop data is added to all emails, and business terms and the declaration of revocation is added to some.
+* Display tax and/or shipping info to all **prices**
+* Automatical generation of **meta data** to products
+* Saving of every **status change of newsletter subscriptions**
+
+There are many more features. Please see the [full list of features](https://github.com/firegento/firegento-magesetup/blob/development/docs/features/features.markdown) for a list of all features with screeenshots.
+
+Which countries does it support?
+--------------------------------
+At the moment of writing this post, we support the following countries:
+
+* Austria
+* France
+* Germany
+* Italy
+* Russia
+* Switzerland
+* United Kingdom
+
+However, it is quite simple to add your own country. We will post a small developers guide to do so soon.
+
+Requirements
+-------------------------
+
+### Store Views
+Prepare your store views if you have a multi language store before to proceed.
+
+### Language package
+All necessary locale packages should be installed before to proceed the setup. For example, if you want to support German and French countries,
+please install the locale de_DE and fr_FR. See [Magento Connect] (http://www.magentocommerce.com/magento-connect/customer-experience/internationalization-localization.html) to get the packages or install them thanks to composer and our [FireGento Module repository](http://packages.firegento.com/). With composer and our example, you should have to add the name "connect20/locale_mage_community_de_DE" and "connect20/locale_mage_community_fr_FR"
+
+
+How to install FireGento_MageSetup?
+-------------------------
+The module can be installed via
+
+* MagentoConnect (link will follow)
+* [GitHub](https://github.com/firegento/firegento-magesetup/)
+* Composer (name "firegento/magesetup" if you are using the [FireGento Module repository](http://packages.firegento.com/) ).
+
+When the module is installed, please clear the cache, logout and login again. You will see the following hint:
+
+Follow the link, fill out the form and submit in order to apply the settings.
+
+
+**Attention:** As stated in the setup form, all tax settings will be overwritten.
+
+Who is behind FireGento_MageSetup?
+----------------------------------
+
+FireGento is a group of Magento developers, working as freelancers and in companies. Starting in 2011, we began developing free modules for the community.
+We don't have any commercial interests. We founded an association in 2013, based in Germany, in order to organize events like the [Magento Hackathons](http://www.mage-hackathon.de/) more easily.
+GermanSetup was one of the first modules to be published, and is the most well known project up to now. It's widely used in Germany, Austria and Switzerland up to now.
+It was started at a small meeting of ~15 persons at the German North Sea coast, and since then, a lot of work has been done in the free time of a couple of developers at home, at work, at conferences and meetings.
diff --git a/modman b/modman
new file mode 100644
index 00000000..71b776ed
--- /dev/null
+++ b/modman
@@ -0,0 +1,16 @@
+src/app/code/community/FireGento/MageSetup/ app/code/community/FireGento/MageSetup/
+src/app/etc/modules/FireGento_MageSetup.xml app/etc/modules/FireGento_MageSetup.xml
+src/app/locale/de_AT/FireGento_MageSetup.csv app/locale/de_AT/FireGento_MageSetup.csv
+src/app/locale/de_DE/FireGento_MageSetup.csv app/locale/de_DE/FireGento_MageSetup.csv
+src/app/locale/de_DE/template/magesetup/ app/locale/de_DE/template/magesetup/
+src/app/locale/en_US/FireGento_MageSetup.csv app/locale/en_US/FireGento_MageSetup.csv
+src/app/locale/en_US/template/magesetup/ app/locale/en_US/template/magesetup/
+src/app/locale/ru_RU/FireGento_MageSetup.csv app/locale/ru_RU/FireGento_MageSetup.csv
+src/app/locale/ru_RU/template/magesetup/ app/locale/ru_RU/template/magesetup/
+src/app/locale/fr_FR/FireGento_MageSetup.csv app/locale/fr_FR/FireGento_MageSetup.csv
+src/app/locale/fr_FR/template/magesetup/ app/locale/fr_FR/template/magesetup/
+src/app/design/adminhtml/default/default/layout/magesetup.xml app/design/adminhtml/default/default/layout/magesetup.xml
+src/app/design/adminhtml/default/default/template/magesetup/ app/design/adminhtml/default/default/template/magesetup/
+src/app/design/frontend/base/default/layout/magesetup.xml app/design/frontend/base/default/layout/magesetup.xml
+src/app/design/frontend/base/default/template/magesetup/ app/design/frontend/base/default/template/magesetup/
+src/skin/frontend/base/default/css/magesetup/ skin/frontend/base/default/css/magesetup
diff --git a/phpdox.xml.dist b/phpdox.xml.dist
new file mode 100644
index 00000000..268b6164
--- /dev/null
+++ b/phpdox.xml.dist
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Magesetup.php b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Magesetup.php
new file mode 100644
index 00000000..933b9e2c
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Magesetup.php
@@ -0,0 +1,234 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.4.0
+ */
+/**
+ * Displays a form with some options to setup things
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.4.0
+ */
+class FireGento_MageSetup_Block_Adminhtml_Magesetup extends Mage_Adminhtml_Block_Widget
+{
+ /**
+ * Class Constructor
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->setTitle('MageSetup');
+ }
+
+ /**
+ * Retrieve the POST URL for the form
+ *
+ * @return string URL
+ */
+ public function getPostActionUrl()
+ {
+ return $this->getUrl('*/*/save');
+ }
+
+ /**
+ * Get old product tax classes
+ *
+ * @return array All existing product tax classes
+ */
+ public function getProductTaxClasses()
+ {
+ return Mage::getSingleton('magesetup/source_tax_productTaxClass')->getAllOptions();
+ }
+
+ /**
+ * Get old product tax classes
+ *
+ * @return array All existing product tax classes
+ */
+ public function getCustomerTaxClasses()
+ {
+ return Mage::getSingleton('magesetup/source_tax_customerTaxClass')->getAllOptions();
+ }
+
+ /**
+ * Get new product tax classes (yet to be created)
+ *
+ * @return array All new product tax classes
+ */
+ public function getNewProductTaxClasses()
+ {
+ return Mage::getSingleton('magesetup/source_tax_newProductTaxClass')->getAllOptions();
+ }
+
+ /**
+ * Get new product tax classes (yet to be created)
+ *
+ * @return array All new product tax classes
+ */
+ public function getNewCustomerTaxClasses()
+ {
+ return Mage::getSingleton('magesetup/source_tax_newCustomerTaxClass')->getAllOptions();
+ }
+
+ /**
+ * Retrieve the default default new product tax class (yet to be created)
+ *
+ * @return int Default Product Tax Class
+ */
+ public function getDefaultProductTaxClass()
+ {
+ return Mage::getSingleton('magesetup/source_tax_newProductTaxClass')->getDefaultOption();
+ }
+
+ /**
+ * Retrieve all locales where the directory email/template exists
+ *
+ * @return array Locale options for email templates
+ */
+ public function getLocaleOptionsForEmailTemplates()
+ {
+ $options = Mage::getSingleton('adminhtml/system_config_source_locale')->toOptionArray();
+ foreach ($options as $key => $value) {
+ $filePath = Mage::getBaseDir('locale') . DS . $value['value'] . DS . 'template' . DS . 'email';
+ if (!file_exists($filePath)) {
+ unset($options[$key]);
+ }
+ }
+
+ return $options;
+ }
+
+ /**
+ * Retrieve all locales where the directory email/template exists
+ *
+ * @return array Locale options for CMS content
+ */
+ public function getLocaleOptionsForCmsContent()
+ {
+ $options = Mage::getSingleton('adminhtml/system_config_source_locale')->toOptionArray();
+ foreach ($options as $key => $value) {
+ $filePath = Mage::getBaseDir('locale') . DS . $value['value'] . DS . 'template' . DS . 'magesetup';
+ if (!file_exists($filePath)) {
+ unset($options[$key]);
+ }
+ }
+
+ return $options;
+ }
+
+ /**
+ * Check if there is more than one Store View
+ *
+ * @return bool Flag if there are more than one store
+ */
+ public function isMultiStore()
+ {
+ return (sizeof($this->getStores()) > 1);
+ }
+
+ /**
+ * Retrieve all stores
+ *
+ * @return array All stores
+ */
+ public function getStores()
+ {
+ return Mage::app()->getStores(false);
+ }
+
+ /**
+ * Retrieve all available countries for MageSetup
+ *
+ * @return array All allowed countries
+ */
+ public function getAvailableCountriesForSetup()
+ {
+ return Mage::helper('magesetup')->getAvailableCountries();
+ }
+
+ /**
+ * @return string
+ */
+ public function getNewProductTaxClassesJson()
+ {
+ $countryTaxClasses = array();
+ foreach(Mage::helper('magesetup')->getAvailableCountries() as $countryId => $countryName) {
+
+ $configFile = Mage::getConfig()->getModuleDir('etc', 'FireGento_MageSetup') . DS . $countryId . DS . 'tax.xml';
+
+ // If the given file does not exist, use the default file
+ if (!file_exists($configFile)) {
+ $configFile = Mage::getConfig()->getModuleDir('etc', 'FireGento_MageSetup') . DS . 'default' . DS . 'tax.xml';
+ }
+
+ $xml = new SimpleXMLElement(file_get_contents($configFile));
+
+ $taxClasses = $xml->default->magesetup->tax_classes->default;
+ foreach($taxClasses->children() as $identifier => $taxClass) {
+ if ($taxClass->class_type != 'PRODUCT'
+ || $taxClass->execute != 1
+ || strpos($identifier, 'shipping') === 0) {
+ continue;
+ }
+ $countryTaxClasses[$countryId][(string)$taxClass->class_id] = (string)$taxClass->class_name;
+ }
+
+ $countryTaxClasses[$countryId][] = $this->__('No tax');
+ }
+
+ return Zend_Json::encode($countryTaxClasses);
+ }
+
+ /**
+ * @return string
+ */
+ public function getNewCustomerTaxClassesJson()
+ {
+ $countryTaxClasses = array();
+ foreach(Mage::helper('magesetup')->getAvailableCountries() as $countryId => $countryName) {
+
+ $configFile = Mage::getConfig()->getModuleDir('etc', 'FireGento_MageSetup') . DS . $countryId . DS . 'tax.xml';
+
+ // If the given file does not exist, use the default file
+ if (!file_exists($configFile)) {
+ $configFile = Mage::getConfig()->getModuleDir('etc', 'FireGento_MageSetup') . DS . 'default' . DS . 'tax.xml';
+ }
+
+ $xml = new SimpleXMLElement(file_get_contents($configFile));
+
+ $taxClasses = $xml->default->magesetup->tax_classes->default;
+ foreach($taxClasses->children() as $identifier => $taxClass) {
+ if ($taxClass->class_type != 'CUSTOMER'
+ || $taxClass->execute != 1) {
+ continue;
+ }
+ $countryTaxClasses[$countryId][(string)$taxClass->class_id] = (string)$taxClass->class_name;
+ }
+ }
+
+ return Zend_Json::encode($countryTaxClasses);
+ }
+}
+
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status.php b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status.php
new file mode 100644
index 00000000..85b66d93
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+/**
+ * Newsletter Subscriber Status Grid Container
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+class FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status
+ extends Mage_Adminhtml_Block_Widget_Grid_Container
+{
+ /**
+ * Class constructor
+ */
+ public function __construct()
+ {
+ $this->_controller = 'adminhtml_newsletter_subscriber_status';
+ $this->_blockGroup = 'magesetup';
+ $this->_headerText = Mage::helper('magesetup')->__('Newsletter Subscribers Status History');
+ parent::__construct();
+ $this->_removeButton('add');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status/Grid.php b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status/Grid.php
new file mode 100644
index 00000000..e6d299d7
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Newsletter/Subscriber/Status/Grid.php
@@ -0,0 +1,128 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+/**
+ * Newsletter Subscriber Status Grid
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+class FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid
+ extends Mage_Adminhtml_Block_Widget_Grid
+{
+ /**
+ * Class constructor
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->setId('subscriberStatusGrid');
+ $this->setDefaultSort('created_at');
+ $this->setDefaultDir('DESC');
+ $this->setSaveParametersInSession(true);
+ $this->setUseAjax(true);
+ }
+
+ /**
+ * Prepares the grid collection
+ *
+ * @see Mage_Adminhtml_Block_Widget_Grid::_prepareCollection()
+ * @return FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid Grid
+ */
+ protected function _prepareCollection()
+ {
+ $collection = Mage::getResourceModel('magesetup/newsletter_subscriber_status_collection');
+ $this->setCollection($collection);
+
+ return parent::_prepareCollection();
+ }
+
+ /**
+ * Prepares the grid columns
+ *
+ * @see Mage_Adminhtml_Block_Widget_Grid::_prepareColumns()
+ * @return FireGento_MageSetup_Block_Adminhtml_Newsletter_Subscriber_Status_Grid Grid
+ */
+ protected function _prepareColumns()
+ {
+ $this->addColumn('subscriber', array(
+ 'header' => Mage::helper('newsletter')->__('ID'),
+ 'index' => 'subscriber',
+ 'type' => 'int',
+ 'width' => '75px'
+ ));
+
+ $this->addColumn('email', array(
+ 'header' => Mage::helper('newsletter')->__('Email'),
+ 'index' => 'email'
+ ));
+
+ $this->addColumn('status', array(
+ 'header' => Mage::helper('newsletter')->__('Status'),
+ 'index' => 'status',
+ 'width' => '150px',
+ 'type' => 'options',
+ 'options' => array(
+ Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE => Mage::helper('newsletter')->__('Not Activated'),
+ Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED => Mage::helper('newsletter')->__('Subscribed'),
+ Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED => Mage::helper('newsletter')->__('Unsubscribed'),
+ Mage_Newsletter_Model_Subscriber::STATUS_UNCONFIRMED => Mage::helper('newsletter')->__('Unconfirmed'),
+ )
+ ));
+
+ $this->addColumn('created_at', array(
+ 'header' => Mage::helper('adminhtml')->__('Created At'),
+ 'index' => 'created_at',
+ 'type' => 'datetime',
+ 'width' => '150px'
+ ));
+
+ return parent::_prepareColumns();
+ }
+
+ /**
+ * Retrieve the grid url for ajax reloads
+ *
+ * @return string Grid Url
+ */
+ public function getGridUrl()
+ {
+ return $this->getUrl('*/*/grid', array('_current'=> true));
+ }
+
+ /**
+ * Deactivate the grid row url
+ *
+ * @see Mage_Adminhtml_Block_Widget_Grid::getRowUrl()
+ * @param Varien_Object $row
+ * @return bool Row Url
+ */
+ public function getRowUrl($row)
+ {
+ return false;
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Notifications.php b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Notifications.php
new file mode 100644
index 00000000..b43bb236
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Adminhtml/Notifications.php
@@ -0,0 +1,82 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.4.0
+ */
+/**
+ * Displays MageSetup notifications
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.4.0
+ */
+class FireGento_MageSetup_Block_Adminhtml_Notifications extends Mage_Adminhtml_Block_Template
+{
+ /**
+ * (non-PHPdoc)
+ * @see Mage_Core_Block_Template::_construct()
+ */
+ protected function _construct()
+ {
+ $this->addData(
+ array(
+ 'cache_lifetime'=> null
+ )
+ );
+ }
+
+ /**
+ * Returns a value that indicates if some of the german setup settings have already been initialized.
+ *
+ * @return bool Flag if MageSetup is already initialized
+ */
+ public function isInitialized()
+ {
+ return Mage::getStoreConfigFlag('magesetup/is_initialized');
+ }
+
+ /**
+ * Get magesetup management url
+ *
+ * @return string URL for MageSetup form
+ */
+ public function getManageUrl()
+ {
+ return $this->getUrl('adminhtml/magesetup');
+ }
+
+ /**
+ * ACL validation before html generation
+ *
+ * @return string Notification content
+ */
+ protected function _toHtml()
+ {
+ if (Mage::getSingleton('admin/session')->isAllowed('system/magesetup')) {
+ return parent::_toHtml();
+ }
+
+ return '';
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price.php b/src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price.php
new file mode 100644
index 00000000..913e3c28
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price.php
@@ -0,0 +1,170 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Enhanced block for product price display of bundle products. Contains the normal price.phtml
+ * rendering and additionally a configured static block.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Block_Bundle_Catalog_Product_Price
+ extends FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract
+{
+ /**
+ * Add content of template block below price html if defined in config
+ *
+ * @return string Price HTML
+ */
+ public function _toHtml()
+ {
+ $html = trim(parent::_toHtml());
+
+ if (empty($html) || !Mage::getStoreConfigFlag('catalog/price/display_block_below_price')) {
+ return $html;
+ }
+
+ $html .= $this->getLayout()->createBlock('core/template')
+ ->setTemplate('magesetup/price_info.phtml')
+ ->setFormattedTaxRate($this->getFormattedTaxRate())
+ ->setIsIncludingTax($this->isIncludingTax())
+ ->setIsShowShippingLink($this->isShowShippingLink())
+ ->setIsShowWeightInfo($this->getIsShowWeightInfo())
+ ->setFormattedWeight($this->getFormattedWeight())
+ ->toHtml();
+
+ return $html;
+ }
+
+ /**
+ * Read tax rate from current product.
+ *
+ * @return string Tax Rate
+ */
+ public function getTaxRate()
+ {
+ if (!$this->getData('tax_rate')) {
+ $this->setData('tax_rate', $this->_loadTaxCalculationRate($this->getProduct()));
+ }
+
+ return $this->getData('tax_rate');
+ }
+
+ /**
+ * Retrieves formatted string of tax rate for user output
+ *
+ * @return string Formatted Tax Rate for the given locale
+ */
+ public function getFormattedTaxRate()
+ {
+ if ($this->getTaxRate() === null
+ || $this->getProduct()->getTypeId() == 'bundle'
+ ) {
+ return '';
+ }
+
+ $locale = Mage::app()->getLocale()->getLocaleCode();
+ $taxRate = Zend_Locale_Format::toFloat($this->getTaxRate(), array('locale' => $locale));
+
+ return $this->__('%s%%', $taxRate);
+ }
+
+ /**
+ * Returns whether or not the price contains taxes
+ *
+ * @return bool Flag if prices are shown with including tax
+ */
+ public function isIncludingTax()
+ {
+ if (!$this->getData('is_including_tax')) {
+ $this->setData('is_including_tax', Mage::getStoreConfig('tax/sales_display/price'));
+ }
+
+ return $this->getData('is_including_tax');
+ }
+
+ /**
+ * Returns whether the shipping link needs to be shown
+ * on the frontend or not.
+ *
+ * @return bool Flag if shipping link should be displayed
+ */
+ public function isShowShippingLink()
+ {
+ $productTypeId = $this->getProduct()->getTypeId();
+ $ignoreTypeIds = array('virtual', 'downloadable');
+ if (in_array($productTypeId, $ignoreTypeIds)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets tax percents for current product
+ *
+ * @param Mage_Catalog_Model_Product $product Product Model
+ * @return string Tax Rate
+ */
+ protected function _loadTaxCalculationRate(Mage_Catalog_Model_Product $product)
+ {
+ $taxPercent = $product->getTaxPercent();
+ if (is_null($taxPercent)) {
+ $taxClassId = $product->getTaxClassId();
+ if ($taxClassId) {
+ $request = Mage::getSingleton('tax/calculation')->getRateRequest(null, null, null, null);
+ $taxPercent = Mage::getSingleton('tax/calculation')->getRate($request->setProductClassId($taxClassId));
+ }
+ }
+
+ if ($taxPercent) {
+ return $taxPercent;
+ }
+
+ return 0;
+ }
+
+ /**
+ * Check if Shipping by Weight is active
+ *
+ * @return bool Flag if product weight should be displayed
+ */
+ public function getIsShowWeightInfo()
+ {
+ return Mage::getStoreConfigFlag('catalog/price/display_product_weight');
+ }
+
+ /**
+ * Get formatted weight incl. unit
+ *
+ * @return string Formatted weight
+ */
+ public function getFormattedWeight()
+ {
+ return floatval($this->getProduct()->getWeight()) . ' ' . Mage::getStoreConfig('catalog/price/weight_unit');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price/Abstract.php b/src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price/Abstract.php
new file mode 100644
index 00000000..c8cebb1d
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Bundle/Catalog/Product/Price/Abstract.php
@@ -0,0 +1,52 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Enhanced block for product price display of all products in spite of bundles (got own block!).
+ * Contains the normal price.phtml rendering and additionally a configured static block.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+
+if (Mage::getConfig()->getModuleConfig('Sitewards_B2BProfessional')->is('active', 'true')) {
+
+ abstract class FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract
+ extends Sitewards_B2BProfessional_Block_Price
+ {
+
+ }
+
+} else {
+
+ abstract class FireGento_MageSetup_Block_Bundle_Catalog_Product_Price_Abstract
+ extends Mage_Bundle_Block_Catalog_Product_Price
+ {
+
+ }
+
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price.php b/src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price.php
new file mode 100644
index 00000000..0878b29d
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price.php
@@ -0,0 +1,253 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Enhanced block for product price display of all products in spite of bundles (got own block!).
+ * Contains the normal price.phtml rendering and additionally a configured static block.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Block_Catalog_Product_Price
+ extends FireGento_MageSetup_Block_Catalog_Product_Price_Abstract
+{
+ /**
+ * @var array Path to common tier price template
+ */
+ protected $_tierPriceDefaultTemplates = array(
+ 'catalog/product/view/tierprices.phtml',
+ 'dermodpro/bcp/catalog/product/view/tierprices.phtml'
+ );
+
+ /**
+ * Add content of template block below price html if defined in config
+ *
+ * @return string Price HTML
+ */
+ public function _toHtml()
+ {
+ $html = trim(parent::_toHtml());
+
+ if (empty($html) || !Mage::getStoreConfigFlag('catalog/price/display_block_below_price')) {
+ return $html;
+ }
+
+ if (!in_array($this->getTemplate(), $this->_tierPriceDefaultTemplates)) {
+ $htmlObject = new Varien_Object();
+ $htmlObject->setParentHtml($html);
+ $htmlTemplate = $this->getLayout()->createBlock('core/template')
+ ->setTemplate('magesetup/price_info.phtml')
+ ->setFormattedTaxRate($this->getFormattedTaxRate())
+ ->setIsIncludingTax($this->isIncludingTax())
+ ->setIsIncludingShippingCosts($this->isIncludingShippingCosts())
+ ->setIsShowShippingLink($this->isShowShippingLink())
+ ->setIsShowWeightInfo($this->getIsShowWeightInfo())
+ ->setFormattedWeight($this->getFormattedWeight())
+ ->toHtml();
+ $htmlObject->setHtml($htmlTemplate);
+
+ $this->_addDeliveryTimeHtml($htmlObject);
+
+ Mage::dispatchEvent('magesetup_after_product_price',
+ array(
+ 'html_obj' => $htmlObject,
+ 'block' => $this,
+ )
+ );
+
+ $html = $htmlObject->getPrefix();
+ $html .= $htmlObject->getParentHtml();
+ $html .= $htmlObject->getHtml();
+ $html .= $htmlObject->getSuffix();
+ }
+
+ return $html;
+ }
+
+ /**
+ * Add delivery time on category pages only
+ *
+ * @param Varien_Object $htmlObject Transport object
+ */
+ protected function _addDeliveryTimeHtml($htmlObject)
+ {
+ if (!Mage::getStoreConfigFlag('catalog/price/display_delivery_time_on_categories')) {
+ return;
+ }
+
+ $pathInfo = Mage::app()->getRequest()->getPathInfo();
+ if (strpos($pathInfo, 'catalog/category/view') !== false
+ || strpos($pathInfo, 'catalogsearch/result') !== false) {
+ if ($this->getProduct()->getDeliveryTime()) {
+ $html = '';
+ $html .= $this->__('Delivery Time') . ': ' . $this->getProduct()->getDeliveryTime();
+ $html .= '
';
+ $htmlObject->setSuffix($html);
+ }
+ }
+ }
+
+ /**
+ * Read tax rate from current product.
+ *
+ * @return string Tax Rate
+ */
+ public function getTaxRate()
+ {
+ $taxRateKey = 'tax_rate_'.$this->getProduct()->getId();
+ if (!$this->getData($taxRateKey)) {
+ $this->setData($taxRateKey, $this->_loadTaxCalculationRate($this->getProduct()));
+ }
+
+ return $this->getData($taxRateKey);
+ }
+
+ /**
+ * Retrieves formatted string of tax rate for user output
+ *
+ * @return string Formatted Tax Rate for the given locale
+ */
+ public function getFormattedTaxRate()
+ {
+ if ($this->getTaxRate() === null
+ || $this->getProduct()->getTypeId() == 'bundle'
+ ) {
+ return '';
+ }
+
+ $locale = Mage::app()->getLocale()->getLocaleCode();
+ $taxRate = Zend_Locale_Format::toFloat($this->getTaxRate(), array('locale' => $locale));
+
+ return $this->__('%s%%', $taxRate);
+ }
+
+ /**
+ * Returns whether or not the price contains taxes
+ *
+ * @return bool Flag if prices are shown with including tax
+ */
+ public function isIncludingTax()
+ {
+ if (!$this->getData('is_including_tax')) {
+ $this->setData('is_including_tax', Mage::getStoreConfig('tax/display/type'));
+ }
+
+ return $this->getData('is_including_tax');
+ }
+
+ /**
+ * Returns whether or not the price contains taxes
+ *
+ * @return bool Flag if shipping costs are including taxes
+ */
+ public function isIncludingShippingCosts()
+ {
+ if (!$this->getData('is_including_shipping_costs')) {
+ $this->setData(
+ 'is_including_shipping_costs',
+ Mage::getStoreConfig('catalog/price/including_shipping_costs')
+ );
+ }
+
+ return $this->getData('is_including_shipping_costs');
+ }
+
+ /**
+ * Returns whether the shipping link needs to be shown
+ * on the frontend or not.
+ *
+ * @return bool Flag if shipping link should be displayed
+ */
+ public function isShowShippingLink()
+ {
+ $productTypeId = $this->getProduct()->getTypeId();
+ $ignoreTypeIds = array('virtual', 'downloadable');
+ if (in_array($productTypeId, $ignoreTypeIds)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets tax percents for current product
+ *
+ * @param Mage_Catalog_Model_Product $product Product Model
+ * @return string Tax Rate
+ */
+ protected function _loadTaxCalculationRate(Mage_Catalog_Model_Product $product)
+ {
+ $taxPercent = $product->getTaxPercent();
+ if (is_null($taxPercent)) {
+ $taxClassId = $product->getTaxClassId();
+ if ($taxClassId) {
+ $request = Mage::getSingleton('tax/calculation')->getRateRequest(null, null, null, null);
+ $taxPercent = Mage::getSingleton('tax/calculation')->getRate($request->setProductClassId($taxClassId));
+ }
+ }
+
+ if ($taxPercent) {
+ return $taxPercent;
+ }
+
+ return 0;
+ }
+
+ /**
+ * Check if Shipping by Weight is active
+ *
+ * @return bool Flag if product weight should be displayed
+ */
+ public function getIsShowWeightInfo()
+ {
+ return Mage::getStoreConfigFlag('catalog/price/display_product_weight');
+ }
+
+ /**
+ * Get formatted weight incl. unit
+ *
+ * @return string Formatted weight
+ */
+ public function getFormattedWeight()
+ {
+ return floatval($this->getProduct()->getWeight()) . ' ' . Mage::getStoreConfig('catalog/price/weight_unit');
+ }
+
+ /**
+ * Translate block sentence
+ *
+ * @return string Translated text
+ */
+ public function __()
+ {
+ $args = func_get_args();
+ $expr = new Mage_Core_Model_Translate_Expr(array_shift($args), 'Mage_Catalog');
+ array_unshift($args, $expr);
+
+ return Mage::app()->getTranslator()->translate($args);
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price/Abstract.php b/src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price/Abstract.php
new file mode 100644
index 00000000..a3c03b1f
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Catalog/Product/Price/Abstract.php
@@ -0,0 +1,63 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Enhanced block for product price display of all products in spite of bundles (got own block!).
+ * Contains the normal price.phtml rendering and additionally a configured static block.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+
+if (
+ Mage::getConfig()->getModuleConfig('Sitewards_B2BProfessional')->is('active', 'true')
+ && version_compare (Mage::getConfig()->getModuleConfig('Sitewards_B2BProfessional')->version, '2.1.0', '<=' )
+) {
+
+ abstract class FireGento_MageSetup_Block_Catalog_Product_Price_Abstract
+ extends Sitewards_B2BProfessional_Block_Price
+ {
+
+ }
+
+} elseif (Mage::getConfig()->getModuleConfig('Belvg_CallForPrice')->is('active', 'true')) {
+
+ abstract class FireGento_MageSetup_Block_Catalog_Product_Price_Abstract
+ extends Belvg_CallForPrice_Block_Catalog_Product_Price
+ {
+
+ }
+
+} else {
+
+ abstract class FireGento_MageSetup_Block_Catalog_Product_Price_Abstract
+ extends Mage_Catalog_Block_Product_Price
+ {
+
+ }
+
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Checkout/Agreements.php b/src/app/code/community/FireGento/MageSetup/Block/Checkout/Agreements.php
new file mode 100644
index 00000000..60f78f2d
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Checkout/Agreements.php
@@ -0,0 +1,68 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Block to display agreements on checkout.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.2.2
+ */
+class FireGento_MageSetup_Block_Checkout_Agreements extends Mage_Checkout_Block_Agreements
+{
+ /**
+ * Filter by "Agreement Type"
+ *
+ * @return Mage_Checkout_Model_Resource_Agreement_Collection Agreements
+ */
+ public function getAgreements()
+ {
+ $agreements = parent::getAgreements();
+ if ($this->_getCustomerSession()->isLoggedIn()) {
+ $agreements->addFieldToFilter('agreement_type', array('in' => array(
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CHECKOUT,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_BOTH,
+ )));
+ } else {
+ $agreements->addFieldToFilter('agreement_type', array('in' => array(
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CUSTOMER,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CHECKOUT,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_BOTH,
+ )));
+ }
+ return $agreements;
+ }
+
+ /**
+ * Retrieve the customer session
+ *
+ * @return Mage_Customer_Model_Session Customer Session
+ */
+ protected function _getCustomerSession()
+ {
+ return Mage::getSingleton('customer/session');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Checkout/Information.php b/src/app/code/community/FireGento/MageSetup/Block/Checkout/Information.php
new file mode 100644
index 00000000..deae0323
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Checkout/Information.php
@@ -0,0 +1,70 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Block to enable ip anonymization for german tracking.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Block_Checkout_Information extends Mage_Core_Block_Template
+{
+ /**
+ * @var string
+ */
+ const XML_PATH_CHECKOUT_DISPLAY_ADDITIONAL_INFORMATION = 'checkout/options/display_additional_information';
+
+ /**
+ * @var string
+ */
+ const XML_PATH_CHECKOUT_ADDITIONAL_INFORMATION = 'checkout/options/additional_information';
+
+ /**
+ * Retrieve the additional information for the review page
+ *
+ * @return string|bool Additional information
+ */
+ public function getCheckoutAdditionalInformation()
+ {
+ $additional = '';
+
+ if (Mage::getStoreConfigFlag(self::XML_PATH_CHECKOUT_DISPLAY_ADDITIONAL_INFORMATION)) {
+ $additional = trim(Mage::getStoreConfig(self::XML_PATH_CHECKOUT_ADDITIONAL_INFORMATION));
+ }
+
+ // Dispatch Event in order to allow adding more additional information texts
+ $additionalObject = new Varien_Object(array('text' => $additional));
+ Mage::dispatchEvent('checkout_additional_information', array('additional' => $additionalObject));
+ $additional = $additionalObject->getText();
+
+ if (!$additional) {
+ return false;
+ }
+
+ return $additional;
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Customer/Account/Agreements.php b/src/app/code/community/FireGento/MageSetup/Block/Customer/Account/Agreements.php
new file mode 100644
index 00000000..c9f7cf15
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Customer/Account/Agreements.php
@@ -0,0 +1,51 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Block to display agreements on customer registration.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.2.2
+ */
+class FireGento_MageSetup_Block_Customer_Account_Agreements extends Mage_Checkout_Block_Agreements
+{
+ /**
+ * Filter by "Agreement Type"
+ *
+ * @return Mage_Checkout_Model_Resource_Agreement_Collection Agreements
+ */
+ public function getAgreements()
+ {
+ $agreements = parent::getAgreements();
+ $agreements->addFieldToFilter('agreement_type', array('in' => array(
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CUSTOMER,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_BOTH,
+ )));
+ return $agreements;
+ }
+
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Ga.php b/src/app/code/community/FireGento/MageSetup/Block/Ga.php
new file mode 100644
index 00000000..a8d93dcc
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Ga.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Block to enable ip anonymization for german tracking.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Block_Ga extends Mage_GoogleAnalytics_Block_Ga
+{
+ const CONFIG_GOOGLE_ANALYTICS_IP_ANONYMIZATION = 'google/analytics/ip_anonymization';
+
+ /**
+ * Prepare and return block's html output
+ *
+ * @return string Google Analytics JS Tracking Code
+ */
+ protected function _toHtml()
+ {
+ $html = parent::_toHtml();
+ if (!Mage::getStoreConfigFlag( self::CONFIG_GOOGLE_ANALYTICS_IP_ANONYMIZATION )) {
+ return $html;
+ }
+
+ $matches = array();
+ $setAccountExpression = '/_gaq\.push\(\[\'_setAccount\', \'[a-zA-Z0-9-_]+\'\]\);\n/';
+ $append = '_gaq.push([\'_gat._anonymizeIp\']);';
+
+ if (preg_match_all($setAccountExpression, $html, $matches) && count($matches) && count($matches[0])) {
+ $html = preg_replace($setAccountExpression, $matches[0][0] . $append . "\n", $html);
+ }
+
+ return $html;
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Imprint/Content.php b/src/app/code/community/FireGento/MageSetup/Block/Imprint/Content.php
new file mode 100644
index 00000000..0379e6ac
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Imprint/Content.php
@@ -0,0 +1,103 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Block to retrieve data from imprint config.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Block_Imprint_Content extends Mage_Core_Block_Template
+{
+ /**
+ * Constructor to set config store view.
+ */
+ public function __construct()
+ {
+ $storeId = $this->getStoreId();
+ $this->setData(Mage::getStoreConfig('general/imprint', $storeId));
+ }
+
+ /**
+ * Set StoreId to get impressum data for this store.
+ *
+ * @param int $storeId Store id.
+ */
+ public function setStoreId($storeId)
+ {
+ $this->setData(Mage::getStoreConfig('general/imprint', $storeId));
+ }
+
+ /**
+ * Getting StoreId to get proper store related
+ * information in order comments.
+ *
+ * @return int|null Store Id
+ */
+ protected function getStoreId()
+ {
+ $orderId = $this->getRequest()->getParam('order_id', 0);
+ if ($orderId > 0) {
+ return Mage::getSingleton('sales/order')->load($orderId)->getStoreId();
+ }
+
+ return null;
+ }
+
+ /**
+ * Retrieve the setting "website". If parameter checkForProtocol is true,
+ * check if there is a valid protocol given, otherwise add http:// manually.
+ *
+ * @param bool $checkForProtocol Flag if website url should be checked for http(s) protocol
+ * @return string Website URL
+ */
+ public function getWeb($checkForProtocol=false)
+ {
+ $web = $this->getData('web');
+ if ($checkForProtocol && strlen(trim($web))) {
+ if (strpos($web, 'http://') === false
+ && strpos($web, 'https://') === false
+ ) {
+ $web = 'http://'.$web;
+ }
+ }
+
+ return $web;
+ }
+
+ /**
+ * Retrieve the specific country name by the selected country code
+ *
+ * @return string Country
+ */
+ public function getCountry()
+ {
+ $countryCode = $this->getData('country');
+
+ return Mage::app()->getLocale()->getCountryTranslation($countryCode);
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Block/Imprint/Field.php b/src/app/code/community/FireGento/MageSetup/Block/Imprint/Field.php
new file mode 100644
index 00000000..39d75ca9
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Block/Imprint/Field.php
@@ -0,0 +1,45 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Block to retrieve data from imprint config field.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Block_Imprint_Field extends FireGento_MageSetup_Block_Imprint_Content
+{
+ /**
+ * Render imprint field
+ *
+ * @return string Field value
+ */
+ protected function _toHtml()
+ {
+ return $this->getData($this->getValue());
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Helper/Catalog/Product/Configuration.php b/src/app/code/community/FireGento/MageSetup/Helper/Catalog/Product/Configuration.php
new file mode 100644
index 00000000..d89008d7
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Helper/Catalog/Product/Configuration.php
@@ -0,0 +1,138 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.0.5
+ */
+/**
+ * Changed product configuration to add product attributes on checkout
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.0.5
+ */
+class FireGento_MageSetup_Helper_Catalog_Product_Configuration
+ extends Mage_Catalog_Helper_Product_Configuration
+{
+ /**
+ * @var array
+ */
+ protected $_finished = array();
+
+ /**
+ * @var array
+ */
+ protected $_products = array();
+
+ /**
+ * Merge Attributes
+ *
+ * @see parent::getCustomOptions()
+ * @param Mage_Catalog_Model_Product_Configuration_Item_Interface $item Quote item
+ * @return array Custom Options
+ */
+ public function getCustomOptions(Mage_Catalog_Model_Product_Configuration_Item_Interface $item)
+ {
+ $optionsParent = parent::getCustomOptions($item);
+ $optionsSelf = $this->_getAttributes($item);
+ $options = array_merge($optionsSelf, $optionsParent);
+
+ return $options;
+ }
+
+ /**
+ * Get the product for the current quote item
+ *
+ * @param Mage_Catalog_Model_Product_Configuration_Item_Interface $item Quote item
+ * @return Mage_Catalog_Model_Product Product Model
+ */
+ protected function _getProduct($item)
+ {
+ $productId = $item->getProduct()->getId();
+ if (!array_key_exists($productId, $this->_products)) {
+ /* @var $product Mage_Catalog_Model_Product */
+ $product = Mage::getModel('catalog/product')
+ ->setStoreId(Mage::app()->getStore()->getId())
+ ->load($productId);
+
+ $this->_products[$productId] = $product;
+ }
+
+ return $this->_products[$productId];
+ }
+
+ /**
+ * Retreve the product attributes
+ *
+ * @param Mage_Catalog_Model_Product_Configuration_Item_Interface $item Quote item
+ * @return array Attributes
+ */
+ protected function _getAttributes($item)
+ {
+ $itemId = $item->getId();
+ if (!isset($this->_finished[$itemId])) {
+ $this->_finished[$itemId] = true;
+ $product = $this->_getProduct($item);
+ $attributes = $this->_getAdditionalData($product);
+ if (count($attributes) > 0) {
+ return $attributes;
+ }
+ }
+
+ return array();
+ }
+
+ /**
+ * Retrieve the attributes which are visible on the checkout page
+ *
+ * @param Mage_Catalog_Model_Product $product Product Model
+ * @return array Addition data as array
+ */
+ protected function _getAdditionalData(Mage_Catalog_Model_Product $product)
+ {
+ $data = array();
+
+ $attributes = $product->getAttributes();
+ foreach ($attributes as $attribute) {
+ if ($attribute->getIsVisibleOnCheckout()) {
+ $value = $attribute->getFrontend()->getValue($product);
+ if (!$product->hasData($attribute->getAttributeCode()) || (string) $value == '') {
+ $value = '';
+ } elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) {
+ $value = Mage::app()->getStore()->convertPrice($value, true);
+ }
+
+ if (is_string($value) && strlen($value)) {
+ $data[$attribute->getAttributeCode()] = array(
+ 'label' => $attribute->getStoreLabel(),
+ 'value' => $value,
+ 'print_value' => $value,
+ 'code' => $attribute->getAttributeCode()
+ );
+ }
+ }
+ }
+
+ return $data;
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Helper/Checkout/Data.php b/src/app/code/community/FireGento/MageSetup/Helper/Checkout/Data.php
new file mode 100644
index 00000000..e8277f7f
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Helper/Checkout/Data.php
@@ -0,0 +1,90 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Rewrite to fetch required agreement ids.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+class FireGento_MageSetup_Helper_Checkout_Data
+ extends Mage_Checkout_Helper_Data
+{
+ /**
+ * Avoid loss of translation
+ */
+ function __construct()
+ {
+ $this->_moduleName = 'Mage_Checkout';
+ }
+
+ /**
+ * Get all required agreement ids
+ *
+ * @return array Agreement Ids
+ **/
+ public function getRequiredAgreementIds()
+ {
+ if (is_null($this->_agreements)) {
+ if (!Mage::getStoreConfigFlag('checkout/options/enable_agreements')) {
+ $this->_agreements = array();
+ } else {
+ $agreements = Mage::getModel('checkout/agreement')->getCollection()
+ ->addStoreFilter(Mage::app()->getStore()->getId())
+ ->addFieldToFilter('is_active', 1)
+ ->addFieldToFilter('is_required', 1); // Only get Required Elements
+
+ if ($this->_getCustomerSession()->isLoggedIn()) {
+ $agreements->addFieldToFilter('agreement_type', array('in' => array(
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CHECKOUT,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_BOTH,
+ )));
+ } else {
+ $agreements->addFieldToFilter('agreement_type', array('in' => array(
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CUSTOMER,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CHECKOUT,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_BOTH,
+ )));
+ }
+
+ $this->_agreements = $agreements->getAllIds();
+ }
+ }
+
+ return $this->_agreements;
+ }
+
+ /**
+ * Retrieve the customer session
+ *
+ * @return Mage_Customer_Model_Session Customer Session
+ */
+ protected function _getCustomerSession()
+ {
+ return Mage::getSingleton('customer/session');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Helper/Data.php b/src/app/code/community/FireGento/MageSetup/Helper/Data.php
new file mode 100644
index 00000000..26d9d52b
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Helper/Data.php
@@ -0,0 +1,107 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+/**
+ * Dummy data helper for translation issues.
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.1.0
+ */
+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';
+
+ /**
+ * 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 (!$cmsPage->getId() || !$cmsPage->getIsActive()) {
+ return '';
+ }
+
+ return Mage::helper('cms/page')->getPageUrl($cmsPage->getId());
+ }
+
+ /**
+ * Get url of agreement view for checkout
+ *
+ * @param Mage_Checkout_Model_Agreement $agreement Agreement
+ * @return string URL for the given agreement
+ */
+ public function getAgreementUrl(Mage_Checkout_Model_Agreement $agreement)
+ {
+ return Mage::getUrl('magesetup/frontend/agreements', array('id' => $agreement->getId()));
+ }
+
+ /**
+ * Get available countries
+ *
+ * @return array All available countries
+ */
+ public function getAvailableCountries()
+ {
+ $availableCountries = array();
+ $config = Mage::getConfig()->getNode('global/magesetup/available_countries');
+ if ($config) {
+ foreach (array_keys($config->asArray()) as $countryId) {
+ $availableCountries[$countryId] = Mage::app()->getLocale()->getCountryTranslation(strtoupper($countryId));
+ }
+ }
+ asort($availableCountries);
+ return $availableCountries;
+ }
+
+ /**
+ * Check whether specified country is in EU countries list
+ *
+ * @param string $countryCode
+ * @return bool
+ */
+ public function isCountryInEU($countryCode)
+ {
+ return in_array(strtoupper($countryCode), $this->getEUCountries());
+ }
+
+ /**
+ * Get countries in the EU
+ *
+ * @return array
+ */
+ public function getEUCountries()
+ {
+ return explode(',', Mage::getStoreConfig(self::XML_PATH_EU_COUNTRIES_LIST));
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Config.php b/src/app/code/community/FireGento/MageSetup/Model/Config.php
new file mode 100644
index 00000000..08076be8
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Config.php
@@ -0,0 +1,128 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Config class
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+class FireGento_MageSetup_Model_Config extends Varien_Simplexml_Config
+{
+ const CACHE_ID = 'magesetup_config';
+ const CACHE_TAG = 'magesetup_config';
+
+ /**
+ * @var string
+ */
+ protected $_country = 'de';
+
+ /**
+ * Sets cache ID and cache tags and loads configuration
+ *
+ * @param string|Varien_Simplexml_Element $sourceData XML Source Data
+ */
+ public function __construct($sourceData=null)
+ {
+ $this->setCacheId(self::CACHE_ID);
+ $this->setCacheTags(array(self::CACHE_TAG));
+ parent::__construct($sourceData);
+ $this->_loadConfig();
+ }
+
+ /**
+ * Set the current country for the config
+ *
+ * @param string $country Country
+ * @return FireGento_MageSetup_Model_Config Config Model
+ */
+ public function setCountry($country)
+ {
+ $this->_country = $country;
+ return $this;
+ }
+
+ /**
+ * Merge default config with config from additional xml files
+ *
+ * @return FireGento_MageSetup_Model_Config Config Model
+ */
+ protected function _loadConfig()
+ {
+ if (Mage::app()->useCache(self::CACHE_ID)) {
+ if ($this->loadCache()) {
+ return $this;
+ }
+ }
+
+ if (!is_null(Mage::registry('setup_country'))) {
+ $this->setCountry(Mage::registry('setup_country'));
+ }
+
+ $mergeConfig = Mage::getModel('core/config_base');
+ $config = Mage::getConfig();
+
+ // Load additional config files
+ $this->_addConfigFile('cms.xml', $mergeConfig);
+ $this->_addConfigFile('email.xml', $mergeConfig);
+ $this->_addConfigFile('systemconfig.xml', $mergeConfig);
+ $this->_addConfigFile('agreement.xml', $mergeConfig);
+ $this->_addConfigFile('tax.xml', $mergeConfig);
+
+ $this->setXml($config->getNode());
+
+ if (Mage::app()->useCache(self::CACHE_ID)) {
+ $this->saveCache();
+ }
+
+ return $this;
+ }
+
+ /**
+ * Add a config file to the given merge config
+ *
+ * @param string $fileName File to load
+ * @param Mage_Core_Model_Config_Base $mergeConfig Global config for merging
+ */
+ protected function _addConfigFile($fileName, $mergeConfig)
+ {
+ $config = Mage::getConfig();
+ $configFile = $config->getModuleDir('etc', 'FireGento_MageSetup') . DS . $this->_country . DS . $fileName;
+
+ // If the given file does not exist, use the default file
+ if (!file_exists($configFile)) {
+ $configFile = $config->getModuleDir('etc', 'FireGento_MageSetup') . DS . 'default' . DS . $fileName;
+ }
+
+ // Load the given config file
+ if (file_exists($configFile)) {
+ if ($mergeConfig->loadFile($configFile)) {
+ $config->extend($mergeConfig, true);
+ }
+ }
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Newsletter/Observer.php b/src/app/code/community/FireGento/MageSetup/Model/Newsletter/Observer.php
new file mode 100644
index 00000000..d3182d9f
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Newsletter/Observer.php
@@ -0,0 +1,60 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+/**
+ * Observer class
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+class FireGento_MageSetup_Model_Newsletter_Observer
+{
+ /**
+ * Saves the subscriber status change in a custom history
+ * after a subscriber was saved.
+ *
+ * @magentoEvent newsletter_subscriber_save_after
+ * @param Varien_Event_Observer $observer Observer
+ */
+ public function saveSubscriberStatusHistory(Varien_Event_Observer $observer)
+ {
+ try {
+ /* @var $subscriber Mage_Newsletter_Model_Subscriber */
+ $subscriber = $observer->getEvent()->getSubscriber();
+
+ /* @var $status FireGento_MageSetup_Model_Newsletter_Subscriber_Status */
+ $status = Mage::getModel('magesetup/newsletter_subscriber_status');
+ $status->setData('subscriber', $subscriber->getId());
+ $status->setData('status', $subscriber->getData('subscriber_status'));
+ $status->setData('email', $subscriber->getData('subscriber_email'));
+ $status->setData('created_at', now());
+ $status->save();
+ } catch (Exception $e) {
+ Mage::logException($e);
+ }
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Newsletter/Subscriber/Status.php b/src/app/code/community/FireGento/MageSetup/Model/Newsletter/Subscriber/Status.php
new file mode 100644
index 00000000..0467e1d8
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Newsletter/Subscriber/Status.php
@@ -0,0 +1,44 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+/**
+ * Subscriber Status Model
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+class FireGento_MageSetup_Model_Newsletter_Subscriber_Status
+ extends Mage_Core_Model_Abstract
+{
+ /**
+ * Init resource model
+ */
+ protected function _construct()
+ {
+ $this->_init('magesetup/newsletter_subscriber_status');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Observer.php b/src/app/code/community/FireGento/MageSetup/Model/Observer.php
new file mode 100644
index 00000000..7db5aa95
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Observer.php
@@ -0,0 +1,356 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Observer class
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+class FireGento_MageSetup_Model_Observer
+{
+ /**
+ * Add "Visible on Checkout Review on Front-end" Option to Attribute Settings
+ *
+ * @magentoEvent adminhtml_catalog_product_attribute_edit_prepare_form
+ *
+ * @param Varien_Event_Observer $observer Observer
+ * @return FireGento_MageSetup_Model_Observer Observer
+ */
+ public function addIsVisibleOnCheckoutOption(Varien_Event_Observer $observer)
+ {
+ $event = $observer->getEvent();
+ $form = $event->getForm();
+
+ $fieldset = $form->getElement('front_fieldset');
+ $source = Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray();
+ $fieldset->addField(
+ 'is_visible_on_checkout',
+ 'select',
+ array(
+ 'name' => 'is_visible_on_checkout',
+ 'label' => Mage::helper('magesetup')->__('Visible in Checkout'),
+ 'title' => Mage::helper('magesetup')->__('Visible in Checkout'),
+ 'values' => $source,
+ )
+ );
+
+ return $this;
+ }
+
+ /**
+ * Filters all agreements
+ *
+ * Filters all agreements against the Magento template filter. This enables the Magento
+ * administrator define a cms static block as the content of the checkout agreements..
+ *
+ * @magentoEvent core_block_abstract_to_html_before
+ *
+ * @param Varien_Event_Observer $observer Observer
+ * @return FireGento_MageSetup_Model_Observer Observer
+ */
+ public function filterAgreements(Varien_Event_Observer $observer)
+ {
+ $block = $observer->getEvent()->getBlock();
+ if ($block->getType() == 'checkout/agreements') {
+ if ($agreements = $block->getAgreements()) {
+ $collection = new Varien_Data_Collection();
+ foreach ($agreements as $agreement) {
+ $agreement->setData('content', $this->_filterString($agreement->getData('content')));
+ $agreement->setData('checkbox_text', $this->_filterString($agreement->getData('checkbox_text')));
+ $collection->addItem($agreement);
+ }
+ $observer->getEvent()->getBlock()->setAgreements($collection);
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * Calls the Magento template filter to transform {{block type="cms/block" block_id="xyz"}}
+ * into the specific html code
+ *
+ * @param string $string Agreement to filter
+ * @return string Processed String
+ */
+ protected function _filterString($string)
+ {
+ $processor = Mage::getModel('cms/template_filter');
+ $string = $processor->filter($string);
+
+ return $string;
+ }
+
+ /**
+ * Auto-Generates the meta information of a product.
+ *
+ * @magentoEvent catalog_product_save_before
+ *
+ * @param Varien_Event_Observer $observer Observer
+ * @return FireGento_MageSetup_Model_Observer Observer
+ */
+ public function autogenerateMetaInformation(Varien_Event_Observer $observer)
+ {
+ /* @var $product Mage_Catalog_Model_Product */
+ $product = $observer->getEvent()->getProduct();
+
+ if ($product->getData('meta_autogenerate') == 1) {
+ // Set Meta Title
+ $product->setMetaTitle($product->getName());
+
+ // Set Meta Keywords
+ $keywords = $this->_getCategoryKeywords($product);
+ if (!empty($keywords)) {
+ if (mb_strlen($keywords) > 255) {
+ $remainder = '';
+ $keywords = Mage::helper('core/string')->truncate($keywords, 255, '', $remainder, false);
+ }
+ $product->setMetaKeyword($keywords);
+ }
+
+ // Set Meta Description
+ $description = $product->getShortDescription();
+ if (empty($description)) {
+ $description = $product->getDescription();
+ }
+ if (empty($description)) {
+ $description = $keywords;
+ }
+ if (mb_strlen($description) > 255) {
+ $remainder = '';
+ $description = Mage::helper('core/string')->truncate($description, 255, '...', $remainder, false);
+ }
+ $product->setMetaDescription($description);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get the categories of the current product
+ *
+ * @param Mage_Catalog_Model_Product $product Product
+ * @return array Categories
+ */
+ protected function _getCategoryKeywords($product)
+ {
+ $categories = $product->getCategoryIds();
+ $categoryArr = $this->_fetchCategoryNames($categories);
+ $keywords = $this->_buildKeywords($categoryArr);
+
+ return $keywords;
+ }
+
+ /**
+ * Fetches all category names via category path; adds first the assigned
+ * categories and second all categories via path.
+ *
+ * @param array $categories Category Ids
+ * @return array Categories
+ */
+ protected function _fetchCategoryNames($categories)
+ {
+ $return = array(
+ 'assigned' => array(),
+ 'path' => array()
+ );
+
+ foreach ($categories as $categoryId) {
+ // Check if category was already added
+ if (array_key_exists($categoryId, $return['assigned'])
+ || array_key_exists($categoryId, $return['path'])
+ ) {
+ return;
+ }
+
+ /* @var $category Mage_Catalog_Model_Category */
+ $category = Mage::getModel('catalog/category')->load($categoryId);
+ $return['assigned'][$categoryId] = $category->getName();
+
+ // Fetch path ids and remove the first two (base and root category)
+ $path = $category->getPath();
+ $pathIds = explode('/', $path);
+ array_shift($pathIds);
+ array_shift($pathIds);
+
+ // Fetch the names from path categories
+ if (count($pathIds) > 0) {
+ foreach ($pathIds as $pathId) {
+ if (!array_key_exists($pathId, $return['assigned'])
+ && !array_key_exists($pathId, $return['path'])
+ ) {
+ /* @var $pathCategory Mage_Catalog_Model_Category */
+ $pathCategory = Mage::getModel('catalog/category')->load($pathId);
+ $return['path'][$pathId] = $pathCategory->getName();
+ }
+ }
+ }
+ }
+
+ return $return;
+ }
+
+ /**
+ * Processes the category array and generates a string
+ *
+ * @param array $categoryTypes Categories
+ * @return string Keywords
+ */
+ protected function _buildKeywords($categoryTypes)
+ {
+ if (!$categoryTypes) {
+ return '';
+ }
+
+ $keywords = array();
+ foreach ($categoryTypes as $categories) {
+ $keywords[] = implode(', ', $categories);
+ }
+
+ return implode(', ', $keywords);
+ }
+
+ /**
+ * Add "Required" and "Visible on Custom Creation" Option to Checkout Agreements
+ *
+ * @magentoEvent adminhtml_block_html_before
+ *
+ * @param Varien_Event_Observer $observer Observer
+ * @return FireGento_MageSetup_Model_Observer Observer
+ */
+ public function addOptionsForAgreements(Varien_Event_Observer $observer)
+ {
+ $block = $observer->getEvent()->getBlock();
+ if ($block instanceof Mage_Adminhtml_Block_Checkout_Agreement_Edit_Form) {
+ $helper = Mage::helper('magesetup');
+ $form = $block->getForm();
+
+ $fieldset = $form->getElement('base_fieldset');
+ $fieldset->addField('is_required', 'select', array(
+ 'label' => $helper->__('Required'),
+ 'title' => $helper->__('Required'),
+ 'note' => $helper->__('Display Checkbox on Frontend'),
+ 'name' => 'is_required',
+ 'required' => true,
+ 'options' => array(
+ '1' => $helper->__('Yes'),
+ '0' => $helper->__('No'),
+ ),
+ ));
+
+ $fieldset->addField('agreement_type', 'select', array(
+ 'label' => $helper->__('Display on'),
+ 'title' => $helper->__('Display on'),
+ 'note' => $helper->__('Require Confirmation on Customer Registration and/or Checkout'),
+ 'name' => 'agreement_type',
+ 'required' => true,
+ 'options' => Mage::getSingleton('magesetup/source_agreementType')->getOptionArray(),
+ ));
+
+ Mage::dispatchEvent('magesetup_adminhtml_checkout_agreement_edit_form', array(
+ 'form' => $form,
+ 'fieldset' => $fieldset,
+ ));
+
+ $model = Mage::registry('checkout_agreement');
+ $form->setValues($model->getData());
+ $block->setForm($form);
+ }
+
+ return $this;
+ }
+
+ /**
+ * After updating the quantities of cart items, it might be needed to recalculate the shipping tax
+ *
+ * @magentoEvent checkout_cart_update_items_after
+ *
+ * @param Varien_Event_Observer $observer Observer
+ */
+ public function recollectAfterQuoteItemUpdate(Varien_Event_Observer $observer)
+ {
+ $store = Mage::app()->getStore();
+ if (Mage::getStoreConfig(FireGento_MageSetup_Model_Tax_Config::XML_PATH_SHIPPING_TAX_ON_PRODUCT_TAX, $store)
+ == FireGento_MageSetup_Model_Tax_Config::USE_TAX_DEPENDING_ON_PRODUCT_VALUES
+ ) {
+ Mage::getSingleton('checkout/session')
+ ->getQuote()
+ ->setTotalsCollectedFlag(false)
+ ->collectTotals();
+ }
+ }
+
+ /**
+ * Get required agreements on custom registration
+ *
+ * @return array Customer agreement ids
+ */
+ protected function _getCustomerCreateAgreements()
+ {
+ $ids = Mage::getModel('checkout/agreement')->getCollection()
+ ->addStoreFilter(Mage::app()->getStore()->getId())
+ ->addFieldToFilter('is_active', 1)
+ ->addFieldToFilter('agreement_type', array('in' => array(
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_CUSTOMER,
+ FireGento_MageSetup_Model_Source_AgreementType::AGREEMENT_TYPE_BOTH,
+ ))) // Only get Required Elements
+ ->getAllIds();
+
+ return $ids;
+ }
+
+ /**
+ * Check if there are required agreements for the customer registration
+ * and validate them if applicable.
+ *
+ * @magentoEvent controller_action_predispatch_customer_account_createpost
+ *
+ * @param Varien_Event_Observer $observer Observer
+ */
+ public function customerCreatePreDispatch(Varien_Event_Observer $observer)
+ {
+ $requiredAgreements = $this->_getCustomerCreateAgreements();
+ $controller = $observer->getEvent()->getControllerAction();
+ $postedAgreements = array_keys($controller->getRequest()->getPost('agreement', array()));
+
+ if ($diff = array_diff($requiredAgreements, $postedAgreements)) {
+ $session = Mage::getSingleton('customer/session');
+ $session->addException(
+ new Mage_Customer_Exception('Cannot create customer: agreements not confirmed'),
+ Mage::helper('magesetup')->__('Agreements not confirmed.')
+ );
+
+ $controller->getResponse()->setRedirect( Mage::getUrl('*/*/create', array('_secure' => true)) );
+ $controller->setFlag(
+ $controller->getRequest()->getActionName(),
+ Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH,
+ true
+ );
+ }
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Resource/Newsletter/Subscriber/Status.php b/src/app/code/community/FireGento/MageSetup/Model/Resource/Newsletter/Subscriber/Status.php
new file mode 100644
index 00000000..964ad517
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Resource/Newsletter/Subscriber/Status.php
@@ -0,0 +1,44 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+/**
+ * Subscriber Status Resource Model
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+class FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status
+ extends Mage_Core_Model_Resource_Db_Abstract
+{
+ /**
+ * Init main table and id field name
+ */
+ protected function _construct()
+ {
+ $this->_init('magesetup/newsletter_subscriber_status', 'id');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Resource/Newsletter/Subscriber/Status/Collection.php b/src/app/code/community/FireGento/MageSetup/Model/Resource/Newsletter/Subscriber/Status/Collection.php
new file mode 100644
index 00000000..3f1debfa
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Resource/Newsletter/Subscriber/Status/Collection.php
@@ -0,0 +1,44 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+/**
+ * Subscriber Status Resource Collection Model
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.1.4
+ */
+class FireGento_MageSetup_Model_Resource_Newsletter_Subscriber_Status_Collection
+ extends Mage_Core_Model_Resource_Db_Collection_Abstract
+{
+ /**
+ * Initialize the model and resource for the collection
+ */
+ public function _construct()
+ {
+ $this->_init('magesetup/newsletter_subscriber_status');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Setup.php b/src/app/code/community/FireGento/MageSetup/Model/Setup.php
new file mode 100644
index 00000000..404d8c2c
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Setup.php
@@ -0,0 +1,235 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Setup class
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 1.2.0
+ */
+class FireGento_MageSetup_Model_Setup extends Mage_Core_Model_Abstract
+{
+ /**
+ * Setup MageSetup as if a user sends the adminhtml form
+ * See method _getDefaultParams for possible params
+ *
+ * @param array $params Setup params
+ * @param bool $notify Flag if admin notifications should be added
+ * @return FireGento_MageSetup_Model_Setup Setup Model
+ */
+ public function setup($params = array(), $notify=false)
+ {
+ $defaultParams = $this->_getDefaultParams();
+
+ $params = array_merge($defaultParams, $params);
+
+ Mage::register('setup_country', $params['country']);
+
+ if ($params['systemconfig']) {
+ Mage::getSingleton('magesetup/setup_systemconfig')->setup();
+
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: System Config Settings have been updated.')
+ );
+ }
+ }
+
+ if ($params['cms']) {
+ if (!is_array($params['cms_locale'])) {
+ $params['cms_locale'] = array('default' => $params['cms_locale']);
+ }
+ Mage::getSingleton('magesetup/setup_cms')->setup($params['cms_locale']);
+
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: CMS Blocks and Pages have been created.')
+ );
+ }
+ }
+
+ if ($params['agreements']) {
+ if (!is_array($params['cms_locale'])) {
+ $params['cms_locale'] = array('default' => $params['cms_locale']);
+ }
+ Mage::getSingleton('magesetup/setup_agreements')->setup($params['cms_locale']);
+
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: Checkout Agreements have been created.')
+ );
+ }
+ }
+
+ if ($params['email']) {
+ if (!is_array($params['email_locale'])) {
+ $params['email_locale'] = array('default' => $params['email_locale']);
+ }
+ Mage::getSingleton('magesetup/setup_email')->setup($params['email_locale'], $params['overwrite_emails']);
+
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: Email Templates have been created.')
+ );
+ }
+ }
+
+ if ($params['tax']) {
+ // Setup tax settings (rules, classes, ..)
+ Mage::getSingleton('magesetup/setup_tax')->setup();
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: Tax Settings have been created.')
+ );
+ }
+
+ // Update product tax classes
+ $this->_updateProductTaxClasses($params);
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: Product Tax Classes have been updated.')
+ );
+ }
+
+ // Update customer tax classes
+ $this->_updateCustomerTaxClasses($params);
+ if ($notify) {
+ $this->_getAdminhtmlSession()->addSuccess(
+ $this->_getHelper()->__('MageSetup: Customer Tax Classes have been updated.')
+ );
+ }
+ }
+
+ // Set a config flag to indicate that the setup has been initialized and refresh config cache.
+ Mage::getModel('eav/entity_setup', 'core_setup')->setConfigData('magesetup/is_initialized', '1');
+ Mage::app()->getCacheInstance()->cleanType('config');
+ Mage::dispatchEvent('adminhtml_cache_refresh_type', array('type' => 'config'));
+
+ return $this;
+ }
+
+ /**
+ * Get default parameters like they are in the backend form
+ *
+ * @return array Default setup params
+ */
+ protected function _getDefaultParams()
+ {
+ $productTaxClassTargets = array();
+ foreach (Mage::getSingleton('magesetup/source_tax_productTaxClass')->getAllOptions() as $option) {
+ $productTaxClassTargets[$option['value']] = 1;
+ }
+
+ $customerTaxClassTargets = array();
+ foreach (Mage::getSingleton('magesetup/source_tax_customerTaxClass')->getAllOptions() as $option) {
+ $customerTaxClassTargets[$option['value']] = 1;
+ }
+
+ return array(
+ 'country' => 'de',
+ 'systemconfig' => true,
+ 'cms' => true,
+ 'cms_locale' => array('default' => 'de_DE'),
+ 'agreements' => true,
+ 'email' => true,
+ 'email_locale' => array('default' => 'de_DE'),
+ 'overwrite_emails' => false,
+ 'tax' => true,
+ 'product_tax_class_target' => $productTaxClassTargets,
+ 'customer_tax_class_target' => $customerTaxClassTargets,
+ );
+ }
+
+ /**
+ * Update the old product tax classes to the new tax class ids
+ *
+ * @param array $params Setup params
+ */
+ protected function _updateProductTaxClasses($params)
+ {
+ $taxClasses = $params['product_tax_class_target'];
+ foreach ($taxClasses as $source => $target) {
+ if ($target = intval($target)) {
+ Mage::getSingleton('magesetup/setup_tax')->updateProductTaxClasses($source, $target);
+ }
+ }
+
+ $this->_markIndicesOutdated();
+ }
+
+ /**
+ * Update the old product tax classes to the new tax class ids
+ *
+ * @param array $params Setup params
+ */
+ protected function _updateCustomerTaxClasses($params)
+ {
+ $taxClasses = $params['customer_tax_class_target'];
+ foreach ($taxClasses as $source => $target) {
+ if ($target = intval($target)) {
+ Mage::getSingleton('magesetup/setup_tax')->updateCustomerTaxClasses($source, $target);
+ }
+ }
+ }
+
+ /**
+ * Mark relevant indices as outdated after changing tax rates
+ */
+ protected function _markIndicesOutdated()
+ {
+ // Indexes which need to be updated after setup
+ $indexes = array('catalog_product_price', 'catalog_product_flat', 'catalog_product_attribute');
+
+ $indices = Mage::getModel('index/process')
+ ->getCollection()
+ ->addFieldToFilter('indexer_code', array('in' => $indexes));
+
+ foreach ($indices as $index) {
+ $index->setStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX)->save();
+ }
+ }
+
+ /**
+ * Retrieve the helper class
+ *
+ * @return FireGento_MageSetup_Helper_Data Helper Class
+ */
+ protected function _getHelper()
+ {
+ return Mage::helper('magesetup');
+ }
+
+ /**
+ * Retrieve the adminhtml session for setup notifications
+ *
+ * @return Mage_Adminhtml_Model_Session Admin Session
+ */
+ protected function _getAdminhtmlSession()
+ {
+ return Mage::getSingleton('adminhtml/session');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Setup/Abstract.php b/src/app/code/community/FireGento/MageSetup/Model/Setup/Abstract.php
new file mode 100644
index 00000000..96b4c782
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Setup/Abstract.php
@@ -0,0 +1,163 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Setup class
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+class FireGento_MageSetup_Model_Setup_Abstract extends Mage_Core_Model_Abstract
+{
+ /**
+ * @var Mage_Eav_Model_Entity_Setup
+ */
+ protected $_setup;
+
+ /**
+ * @var Varien_Db_Adapter_Interface
+ */
+ protected $_connection;
+
+ /**
+ * Setup setup class and connection
+ */
+ public function __construct()
+ {
+ $this->_setup = Mage::getModel('eav/entity_setup', 'core_setup');
+ $this->_connection = $this->_setup->getConnection();
+ }
+
+ /**
+ * Get config.xml data
+ *
+ * @return Varien_Simplexml_Element Config data
+ */
+ public function getConfigData()
+ {
+ return Mage::getSingleton('magesetup/config')->getNode('default/magesetup');
+ }
+
+ /**
+ * Saves a system config value for the given config path and the given store id
+ *
+ * @param string $configPath Config Path
+ * @param string $value Value
+ * @param int|null $storeId Store ID
+ */
+ public function setConfigData($configPath, $value, $storeId = null)
+ {
+ $setup = $this->_getSetup();
+ if (is_null($storeId)) {
+ $setup->setConfigData($configPath, $value);
+ } else {
+ $setup->setConfigData($configPath, $value, 'stores', $storeId);
+ }
+ }
+
+ /**
+ * Get config.xml data
+ *
+ * @param string $node xml node
+ * @param string|null $childNode if set, child node of the first node
+ * @return array Config Node
+ */
+ protected function _getConfigNode($node, $childNode = null)
+ {
+ $configData = $this->getConfigData()->asArray();
+ if ($childNode) {
+ return $configData[$node][$childNode];
+ } else {
+ return $configData[$node];
+ }
+ }
+
+ /**
+ * Get template content
+ *
+ * @param string $filename Template file name
+ * @return string Template content
+ */
+ public function getTemplateContent($filename)
+ {
+ return @file_get_contents($filename);
+ }
+
+ /**
+ * Load a model by attribute code
+ *
+ * @param Mage_Core_Model_Abstract $model Collection
+ * @param string $attributeCode Attribute code
+ * @param string $value Value
+ * @return Mage_Core_Model_Abstract
+ */
+ protected function _loadExistingModel($model, $attributeCode, $value)
+ {
+ foreach ($model->getCollection() as $singleModel) {
+ if ($singleModel->getData($attributeCode) == $value) {
+ $model->load($singleModel->getId());
+
+ return $model;
+ }
+ }
+
+ return $model;
+ }
+
+ /**
+ * Retrieve the database connection
+ *
+ * @return Varien_Db_Adapter_Interface Database connection
+ */
+ protected function _getConnection()
+ {
+ return $this->_connection;
+ }
+
+ /**
+ * Retrieve the Magento setup model class
+ *
+ * @return Mage_Eav_Model_Entity_Setup Setup Model
+ */
+ protected function _getSetup()
+ {
+ return $this->_setup;
+ }
+
+ /**
+ * Get setup country ID
+ *
+ * @return string
+ */
+ public function getCountryId()
+ {
+ if (!$this->_getData('country_id')) {
+ $this->setData('country_id', Mage::registry('setup_country'));
+ }
+ return $this->_getData('country_id');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Setup/Agreements.php b/src/app/code/community/FireGento/MageSetup/Model/Setup/Agreements.php
new file mode 100644
index 00000000..cfe959b4
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Setup/Agreements.php
@@ -0,0 +1,141 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Setup class for Checkout Agreements
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.5.0
+ */
+class FireGento_MageSetup_Model_Setup_Agreements extends FireGento_MageSetup_Model_Setup_Abstract
+{
+ /**
+ * Setup Checkout Agreements
+ *
+ * @param array $locale Locale options
+ */
+ public function setup($locale = array('default' => 'de_DE'))
+ {
+ foreach ($locale as $storeId => $localeCode) {
+
+ if (!$localeCode) {
+ if (sizeof($locale) == 1) {
+ continue;
+ }
+ $localeCode = $locale['default'];
+ }
+
+ if ($storeId == 'default') {
+ if (sizeof($locale) > 1) {
+ continue;
+ }
+ $storeId = null;
+ }
+
+ foreach ($this->_getConfigAgreements() as $name => $data) {
+ if ($data['execute'] == 1) {
+ $this->_createAgreement($data, $localeCode, false, $storeId);
+ }
+ }
+ }
+
+ // Set config value to true
+ $setup = Mage::getModel('eav/entity_setup', 'core_setup');
+ $setup->setConfigData('checkout/options/enable_agreements', '1');
+ }
+
+ /**
+ * Collect data and create Agreement
+ *
+ * @param array $agreementData Cms page data
+ * @param string $locale Locale
+ * @param boolean $override Override cms page if it exists
+ * @param int|null $storeId Store Id
+ * @return void
+ */
+ protected function _createAgreement($agreementData, $locale, $override=true, $storeId = null)
+ {
+ if (!is_array($agreementData)) {
+ return;
+ }
+
+ $filename = Mage::getBaseDir('locale') . DS . $locale . DS . 'template' . DS . $agreementData['filename'];
+ if (!file_exists($filename)) {
+ return;
+ }
+
+ $templateContent = $this->getTemplateContent($filename);
+
+ // Find name
+ $name = '';
+ if (preg_match('//u', $templateContent, $matches)) {
+ $name = $matches[1];
+ $templateContent = str_replace($matches[0], '', $templateContent);
+ }
+
+ // Find checkbox_text
+ $checkboxText = '';
+ if (preg_match('//u', $templateContent, $matches)) {
+ $checkboxText = $matches[1];
+ $templateContent = str_replace($matches[0], '', $templateContent);
+ }
+
+ // Remove comment lines
+ $templateContent = preg_replace('#\{\*.*\*\}#suU', '', $templateContent);
+
+ $agreementData = array(
+ 'name' => $name,
+ 'content' => $templateContent,
+ 'checkbox_text' => $checkboxText,
+ 'is_active' => $agreementData['is_active'],
+ 'is_html' => $agreementData['is_html'],
+ 'is_required' => $agreementData['is_required'],
+ 'agreement_type' => $agreementData['agreement_type'],
+ 'stores' => $storeId ? $storeId : 0,
+ );
+
+ /* @var $agreement Mage_Checkout_Model_Agreement */
+ $agreement = Mage::getModel('checkout/agreement')->setStoreId($storeId)->load($agreementData['name'], 'name');
+ if (is_array($agreement->getStores()) && !in_array(intval($storeId), $agreement->getStores())) {
+ $agreement = Mage::getModel('checkout/agreement');
+ }
+
+ if (!(int) $agreement->getId() || $override) {
+ $agreement->setData($agreementData)->save();
+ }
+ }
+
+ /**
+ * Get pages/default from config file
+ *
+ * @return array Config agreements
+ */
+ protected function _getConfigAgreements()
+ {
+ return $this->_getConfigNode('agreements', 'default');
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Setup/Cms.php b/src/app/code/community/FireGento/MageSetup/Model/Setup/Cms.php
new file mode 100644
index 00000000..583930a2
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Setup/Cms.php
@@ -0,0 +1,325 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Setup class for CMS pages and blocks
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.5.0
+ */
+class FireGento_MageSetup_Model_Setup_Cms extends FireGento_MageSetup_Model_Setup_Abstract
+{
+ /**
+ * @var array
+ */
+ protected $_footerLinks = array();
+
+ /**
+ * Setup Pages, Blocks and especially Footer Block
+ *
+ * @param array $locale Locale options
+ */
+ public function setup($locale = array('default' => 'de_DE'))
+ {
+ foreach ($locale as $storeId => $localeCode) {
+
+ if (!$localeCode) {
+ continue;
+ }
+
+ if ($storeId == 'default') {
+ $storeId = null;
+ }
+
+ // execute pages
+ foreach ($this->_getConfigPages($locale) as $name => $data) {
+ if ($data['execute'] == 1) {
+ $this->_createCmsPage($data, $localeCode, true, $storeId);
+ }
+ }
+
+ // execute blocks
+ foreach ($this->_getConfigBlocks($locale) as $name => $data) {
+ if ($data['execute'] == 1) {
+ if ($name == 'footerlinks') {
+ $this->_updateFooterLinksBlock($data, $storeId);
+ } else {
+ $this->_createCmsBlock($data, $localeCode, true, $storeId);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Get pages/default from config file
+ *
+ * @return array Config pages
+ */
+ protected function _getConfigPages()
+ {
+ return $this->_getConfigNode('pages', 'default');
+ }
+
+ /**
+ * Get blocks/default from config file
+ *
+ * @return array Config blocks
+ */
+ protected function _getConfigBlocks()
+ {
+ return $this->_getConfigNode('blocks', 'default');
+ }
+
+ /**
+ * Get footer_links/default from config file
+ *
+ * @param int|null $storeId Store ID
+ * @return array Footer Links
+ */
+ protected function _getFooterLinks($storeId)
+ {
+ if (!$storeId) {
+ $storeId = 'default';
+ }
+ if (!isset($this->_footerLinks[$storeId])) {
+ return array();
+ }
+ return $this->_footerLinks[$storeId];
+ }
+
+ /**
+ * Collect data and create CMS page
+ *
+ * @param array $pageData Cms page data
+ * @param string $locale Locale
+ * @param boolean $override Override email template if set
+ * @param int|null $storeId Store ID
+ * @return void
+ */
+ protected function _createCmsPage($pageData, $locale, $override = true, $storeId = null)
+ {
+ if (!is_array($pageData)) {
+ return;
+ }
+
+ $data = array(
+ 'stores' => $storeId ? $storeId : 0,
+ 'is_active' => 1,
+ );
+
+ $filename = Mage::getBaseDir('locale') . DS . $locale . DS . 'template' . DS . $pageData['filename'];
+ if (!file_exists($filename)) {
+ return;
+ }
+
+ $templateContent = $this->getTemplateContent($filename);
+
+ if (preg_match('//u', $templateContent, $matches)) {
+ $data['title'] = $matches[1];
+ $templateContent = str_replace($matches[0], '', $templateContent);
+ }
+
+ if (preg_match('//us', $templateContent, $matches)) {
+ $data['identifier'] = $matches[1];
+ $templateContent = str_replace($matches[0], '', $templateContent);
+ }
+
+ if (preg_match('//s', $templateContent, $matches)) {
+ $data['root_template'] = $matches[1];
+ $templateContent = str_replace($matches[0], '', $templateContent);
+ }
+
+ /**
+ * Remove comment lines
+ */
+ $templateContent = preg_replace('#\{\*.*\*\}#suU', '', $templateContent);
+
+ $data['content'] = $templateContent;
+
+ $page = Mage::getModel('cms/page')->setStoreId($storeId)->load($data['identifier']);
+ if (is_array($page->getStoreId()) && !in_array(intval($storeId), $page->getStoreId())) {
+ $page = Mage::getModel('cms/page');
+ } else {
+ $data['page_id'] = $page->getId();
+ }
+
+ if (!(int) $page->getId() || $override) {
+ $page->setData($data)->save();
+ }
+
+ if (!$storeId) {
+ $storeId = 'default';
+ }
+
+ if ($pageData['footerlink'] == 1) {
+ $this->_footerLinks[$storeId][] = array(
+ 'title' => $data['title'],
+ 'target' => $data['identifier'],
+ );
+ }
+
+ if (isset($pageData['config_option'])) {
+ $this->setConfigData($pageData['config_option'], $data['identifier'], $storeId);
+ }
+ }
+
+ /**
+ * Collect data and create CMS block
+ *
+ * @param array $blockData Cms block data
+ * @param string $locale Locale
+ * @param boolean $override Override email template if set
+ * @param int|null $storeId Store ID
+ * @return void
+ */
+ protected function _createCmsBlock($blockData, $locale, $override = true, $storeId = null)
+ {
+ $block = Mage::getModel('cms/block')->setStoreId($storeId)->load($blockData['identifier']);
+ if (is_array($block->getStores()) && !in_array(intval($storeId), $block->getStores())) {
+ $block = Mage::getModel('cms/block');
+ }
+
+ $filename = Mage::getBaseDir('locale') . DS . $locale . DS . 'template' . DS . $blockData['filename'];
+ if (!file_exists($filename)) {
+ return;
+ }
+
+ $templateContent = $this->getTemplateContent($filename);
+
+ // Find title
+ if (preg_match('//u', $templateContent, $matches)) {
+ $blockData['title'] = $matches[1];
+ $templateContent = str_replace($matches[0], '', $templateContent);
+ }
+
+ // Remove comment lines
+ $templateContent = preg_replace('#\{\*.*\*\}#suU', '', $templateContent);
+
+ if (!$block->getId() || $override) {
+ $blockData['content'] = $templateContent;
+ $blockData['stores'] = $storeId ? $storeId : 0;
+ $blockData['is_active'] = '1';
+ $blockData['block_id'] = $block->getId();
+
+ $block->setData($blockData)->save();
+ }
+ }
+
+ /**
+ * Generate footer_links block from config data
+ *
+ * @param int|null $storeId Store ID
+ * @return string Footer Links Content
+ */
+ protected function _createFooterLinksContent($storeId)
+ {
+ $footerLinksHtml = '';
+ $footerLinksCounter = 0;
+
+ foreach ($this->_getFooterLinks($storeId) as $data) {
+ $footerLinksCounter++;
+ $title = $data['title'];
+ $target = $data['target'];
+ $class = '';
+ if ($footerLinksCounter == count($this->_getFooterLinks($storeId))) {
+ $class = 'last';
+ }
+ $footerLinksHtml .= '';
+ $footerLinksHtml .= '' . $title . ' ';
+ }
+
+ $footerLinksHtml .= ' ';
+
+ return $footerLinksHtml;
+ }
+
+ /**
+ * Update footer_links cms block
+ *
+ * @param array $blockData Cms block data
+ * @param int|null $storeId Store ID
+ */
+ protected function _updateFooterLinksBlock($blockData, $storeId = null)
+ {
+ /** @var $block Mage_Cms_Model_Block */
+ if (is_null($storeId)) {
+ $block = $this->_getDefaultBlock('footer_links');
+ } else {
+ $block = Mage::getModel('cms/block')->setStoreId($storeId)->load('footer_links');
+ }
+
+ if (is_array($block->getStores()) && !in_array(intval($storeId), $block->getStores())) {
+ $block = Mage::getModel('cms/block');
+ }
+
+ if ($block->getId()) {
+
+ /** @var $backupBlock Mage_Cms_Model_Block */
+ $backupBlock = Mage::getModel('cms/block')->load('footer_links_backup');
+ if (!$backupBlock->getId()) {
+
+ // create copy of original block
+ $data = array();
+ $data['block_id'] = $block->getId();
+ $data['identifier'] = 'footer_links_backup';
+
+ $block->setData($data)->save();
+
+ /** @var $block Mage_Cms_Model_Block */
+ $block = Mage::getModel('cms/block');
+ }
+ }
+
+ $data = array(
+ 'title' => 'Footer Links',
+ 'identifier' => 'footer_links',
+ 'content' => $this->_createFooterLinksContent($storeId),
+ 'stores' => $storeId ? $storeId : 0,
+ 'is_active' => '1',
+ );
+
+ if ($storeId) {
+ $data['stores'] = array($storeId);
+ }
+
+ $block->addData($data)->save();
+ }
+
+ /**
+ * Retrieve the default block for the given identifier
+ *
+ * @param string $identifier Block Identifier
+ * @return Mage_Cms_Model_Block Block Model
+ */
+ protected function _getDefaultBlock($identifier)
+ {
+ return Mage::getResourceModel('cms/block_collection')
+ ->addFieldToFilter('identifier', $identifier)
+ ->addStoreFilter(0)->getFirstItem();
+ }
+}
diff --git a/src/app/code/community/FireGento/MageSetup/Model/Setup/Email.php b/src/app/code/community/FireGento/MageSetup/Model/Setup/Email.php
new file mode 100644
index 00000000..e0e73385
--- /dev/null
+++ b/src/app/code/community/FireGento/MageSetup/Model/Setup/Email.php
@@ -0,0 +1,218 @@
+
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.2.0
+ */
+/**
+ * Setup class for transaction emails
+ *
+ * @category FireGento
+ * @package FireGento_MageSetup
+ * @author FireGento Team
+ * @copyright 2013 FireGento Team (http://www.firegento.de). All rights served.
+ * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
+ * @version $Id:$
+ * @since 0.5.0
+ */
+class FireGento_MageSetup_Model_Setup_Email extends FireGento_MageSetup_Model_Setup_Abstract
+{
+ /**
+ * @var array
+ */
+ protected $_localeTemplatePath = array();
+
+ /**
+ * Setup Transaction Emails
+ *
+ * @param array $locale Locale options
+ * @param bool $overwrite Flag if locale options should override existing templates
+ */
+ public function setup($locale = array('default' => 'de_DE'), $overwrite = false)
+ {
+ foreach ($locale as $storeId => $localeCode) {
+
+ if (!$localeCode) {
+ continue;
+ }
+
+ if ($storeId == 'default') {
+ $storeId = null;
+ }
+
+ // execute emails
+ foreach ($this->_getConfigEmails($localeCode) as $data) {
+
+ if ($data['execute'] == 1) {
+
+ // Change override param from false to true to override existing templates for testing
+ $this->_createEmail($data, $localeCode, $overwrite, $storeId);
+ }
+ }
+ }
+ }
+
+ /**
+ * Get email_footers/default from config file
+ *
+ * @return array Config email footers
+ */
+ protected function _getConfigEmailFooters()
+ {
+ return $this->_getConfigNode('email_footers', 'default');
+ }
+
+ /**
+ * Get emails/default from config file
+ *
+ * @return array Config emails
+ */
+ protected function _getConfigEmails()
+ {
+ return $this->_getConfigNode('emails', 'default');
+ }
+
+ /**
+ * Create transactional email template
+ *
+ * @param array $emailData Template data
+ * @param string $locale Locale
+ * @param boolean $override Override email template if set
+ * @param int|null $storeId Store ID
+ * @return void
+ */
+ protected function _createEmail($emailData, $locale, $override = true, $storeId = null)
+ {
+ $templateCode = $emailData['template_code'] . ' (' . $locale . ')';
+ $template = Mage::getModel('core/email_template')
+ ->loadByCode($templateCode);
+
+ if (!$template->getId() || $override) {
+
+ $localeEmailPath = $this->_getLocaleEmailPath($locale);
+
+ $template
+ ->setTemplateCode($templateCode)
+ ->setTemplateType($emailData['template_type'])
+ ->setModifiedAt(Mage::getSingleton('core/date')->gmtDate());
+
+ // Filter areas from template file
+ $templateText = $this->getTemplateContent($localeEmailPath . $emailData['template_file']);
+
+ if (!$templateText) {
+ return; // file not found: return silently
+ }
+
+ if (preg_match('//u', $templateText, $matches)) {
+ $template->setTemplateSubject($matches[1]);
+ $templateText = str_replace($matches[0], '', $templateText);
+ }
+
+ if (preg_match('//us', $templateText, $matches)) {
+ $templateText = str_replace($matches[0], '', $templateText);
+ }
+
+ if (preg_match('//s', $templateText, $matches)) {
+ $template->setTemplateStyles($matches[1]);
+ $templateText = str_replace($matches[0], '', $templateText);
+ }
+
+ // Remove comment lines
+ $templateText = preg_replace('#\{\*.*\*\}#suU', '', $templateText);
+
+ $footerBlocks = $this->_getFooterBlocks($emailData);
+ $templateText = $this->_addFooterBlocks($templateText, $footerBlocks);
+
+ $template
+ ->setTemplateText($templateText)
+ ->save();
+ }
+
+ $this->setConfigData($emailData['config_data_path'], $template->getId(), $storeId);
+ }
+
+ /**
+ * Retrieve email template path for given locale
+ *
+ * @param string $locale Locale
+ * @return string Locale Template Path
+ */
+ protected function _getLocaleEmailPath($locale)
+ {
+ if (!isset($this->_localeTemplatePath[$locale])) {
+ $_localeTemplatePath = Mage::getBaseDir() . DS . 'app' . DS . 'locale' . DS . $locale . DS . 'template' . DS . 'email' . DS;
+ $this->_localeTemplatePath[$locale] = $_localeTemplatePath;
+ if (!is_dir($this->_localeTemplatePath[$locale])) {
+ Mage::throwException(
+ Mage::helper('magesetup')->__(
+ 'Directory "%s" not found. Locale not installed?',
+ $this->_localeTemplatePath[$locale]
+ )
+ );
+ }
+ }
+
+ return $this->_localeTemplatePath[$locale];
+ }
+
+ /**
+ * Add configured blocks before the second last