diff --git a/src/app/code/community/FireGento/GermanSetup/Block/Catalog/Product/Price.php b/src/app/code/community/FireGento/GermanSetup/Block/Catalog/Product/Price.php index 780b708..a288102 100644 --- a/src/app/code/community/FireGento/GermanSetup/Block/Catalog/Product/Price.php +++ b/src/app/code/community/FireGento/GermanSetup/Block/Catalog/Product/Price.php @@ -65,6 +65,8 @@ public function _toHtml() ->toHtml(); $htmlObject->setHtml($htmlTemplate); + $this->_addDeliveryTimeHtml($htmlObject); + Mage::dispatchEvent('germansetup_after_product_price', array( 'html_obj' => $htmlObject, @@ -81,6 +83,27 @@ public function _toHtml() return $html; } + /** + * Add delivery time on category pages only + * + * @param $htmlObject + */ + 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 = '

' . $this->__('Delivery Time') . ': ' . $this->getProduct()->getDeliveryTime() . '

'; + $htmlObject->setSuffix($html); + } + } + } + /** * Read tax rate from current product. * diff --git a/src/app/code/community/FireGento/GermanSetup/Block/Checkout/Information.php b/src/app/code/community/FireGento/GermanSetup/Block/Checkout/Information.php index 37c0bfd..9236133 100644 --- a/src/app/code/community/FireGento/GermanSetup/Block/Checkout/Information.php +++ b/src/app/code/community/FireGento/GermanSetup/Block/Checkout/Information.php @@ -50,17 +50,21 @@ class FireGento_GermanSetup_Block_Checkout_Information extends Mage_Core_Block_T */ public function getCheckoutAdditionalInformation() { - if (!Mage::getStoreConfigFlag(self::XML_PATH_CHECKOUT_DISPLAY_ADDITIONAL_INFORMATION)) { - return false; + $additional = ''; + + if (Mage::getStoreConfigFlag(self::XML_PATH_CHECKOUT_DISPLAY_ADDITIONAL_INFORMATION)) { + $additional = trim(Mage::getStoreConfig(self::XML_PATH_CHECKOUT_ADDITIONAL_INFORMATION)); } - $additional = Mage::getStoreConfig(self::XML_PATH_CHECKOUT_ADDITIONAL_INFORMATION); - $additional = trim($additional); + // 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 $additional; + if (!$additional) { + return false; } - return false; + return $additional; } } diff --git a/src/app/code/community/FireGento/GermanSetup/etc/config.xml b/src/app/code/community/FireGento/GermanSetup/etc/config.xml index 9cb6435..22e415f 100644 --- a/src/app/code/community/FireGento/GermanSetup/etc/config.xml +++ b/src/app/code/community/FireGento/GermanSetup/etc/config.xml @@ -243,6 +243,7 @@ 1 + 1 lieferung diff --git a/src/app/code/community/FireGento/GermanSetup/etc/system.xml b/src/app/code/community/FireGento/GermanSetup/etc/system.xml index 2e7b1d1..59e4d9f 100644 --- a/src/app/code/community/FireGento/GermanSetup/etc/system.xml +++ b/src/app/code/community/FireGento/GermanSetup/etc/system.xml @@ -40,6 +40,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 25 + 1 + 1 + 1 + select diff --git a/src/app/design/frontend/base/default/layout/germansetup.xml b/src/app/design/frontend/base/default/layout/germansetup.xml index 1ff8961..fd91c74 100644 --- a/src/app/design/frontend/base/default/layout/germansetup.xml +++ b/src/app/design/frontend/base/default/layout/germansetup.xml @@ -1,176 +1,497 @@ - - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - simplegermansetup/catalog_product_price - virtualgermansetup/catalog_product_price - groupedgermansetup/catalog_product_price - downloadablegermansetup/catalog_product_price - configurablegermansetup/catalog_product_price - bundlegermansetup/bundle_catalog_product_price + + simple + germansetup/catalog_product_price + + + + virtual + germansetup/catalog_product_price + + + + grouped + germansetup/catalog_product_price + + + + downloadable + germansetup/catalog_product_price + + + + configurable + germansetup/catalog_product_price + + + + bundle + germansetup/bundle_catalog_product_price + + - bundlegermansetup/bundle_catalog_product_price + + bundle + germansetup/bundle_catalog_product_price + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - css/germansetup/checkout.css + + css/germansetup/checkout.css + - - + + + + - agreements + + agreements + - checkout.onepage.agreements + + checkout.onepage.agreements + - + - css/germansetup/checkout.css + + css/germansetup/checkout.css + - germansetup/checkout/multishipping/overview.phtml - agreements - + + germansetup/checkout/multishipping/overview.phtml + + + agreements + + - + diff --git a/src/app/design/frontend/base/default/template/germansetup/delivery_time.phtml b/src/app/design/frontend/base/default/template/germansetup/delivery_time.phtml new file mode 100644 index 0000000..b1e4dc6 --- /dev/null +++ b/src/app/design/frontend/base/default/template/germansetup/delivery_time.phtml @@ -0,0 +1,44 @@ + + * @copyright 2012 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 + */ +/** + * Template for displaying delivery time + * + * @category FireGento + * @package FireGento_GermanSetup + * @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 + */ + +/** + * @var $this Mage_Catalog_Block_Product_View_Abstract + */ +?> + +getProduct()->getDeliveryTime()): ?> +

+ __('Delivery Time') ?>: getProduct()->getDeliveryTime() ?> +

+ diff --git a/src/app/locale/de_DE/FireGento_GermanSetup.csv b/src/app/locale/de_DE/FireGento_GermanSetup.csv index ec9da87..28d750f 100644 --- a/src/app/locale/de_DE/FireGento_GermanSetup.csv +++ b/src/app/locale/de_DE/FireGento_GermanSetup.csv @@ -1,5 +1,6 @@ "Display Block below Price","Block unterhalb der Preise darstellen" "Display tax info and shipping cost link below the price on all pages","Steuerinformationen und Link zur Versandkostenseite auf allen Seiten unterhalb der Preise darstellen" +"Display Delivery time on Category Pages","Lieferzeit auf Produktübersichtsseiten anzeigen" "CMS Page for Shipping Info","CMS-Seite für Versandkosten" "Show ""incl. Shipping Cost"" instead of ""excl. Shipping Cost""","Zeige ""inkl. Versandkosten"" statt ""zzgl. Versandkosten""" "No Page","Keine Seite" @@ -106,3 +107,5 @@ "CMS Settings","CMS-Einstellungen" "Email Settings","Email-Einstellungen" "Tax Settings","Steuer-Einstellungen" + +"Delivery Time","Lieferzeit" \ No newline at end of file