Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
[+TASK] Replace shipping cost block in cart with a link to the shippi…
Browse files Browse the repository at this point in the history
…ng costs cms page (configurable) (#132)
  • Loading branch information
avstudnitz committed Feb 26, 2013
1 parent 936b716 commit bec545c
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 29 deletions.
11 changes: 7 additions & 4 deletions src/app/code/community/FireGento/GermanSetup/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,11 @@
</general>
<checkout>
<options>
<additional_information><![CDATA[Zusätzlich können noch Kosten oder Steuern anfallen, die nicht über uns abgeführt bzw. von uns in Rechnung gestellt werden.]]></additional_information>
<additional_information>
<![CDATA[Zusätzlich können noch Kosten oder Steuern anfallen, die nicht über uns abgeführt bzw. von uns in Rechnung gestellt werden.]]></additional_information>
</options>
<cart>
<hide_shipping>0</hide_shipping>
<hide_shipping>1</hide_shipping>
</cart>
</checkout>
<customer>
Expand All @@ -280,7 +281,8 @@ Tel: {{var telephone}}
{{depend fax}}Fax: {{var fax}}
{{/depend}}
]]></text>
<oneline><![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}, {{var street}}, {{var postcode}} {{var city}}, {{var country}}]]></oneline>
<oneline>
<![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}, {{var street}}, {{var postcode}} {{var city}}, {{var country}}]]></oneline>
<html><![CDATA[
{{depend company}}{{var company}}<br />{{/depend}}
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}<br/>
Expand Down Expand Up @@ -308,7 +310,8 @@ Tel: {{var telephone}}
]]></pdf>
<js_template template="title" module="customer">
<title>Javascript Template</title>
<defaultFormat><![CDATA[#{company}<br/>#{prefix} #{firstname} #{middlename} #{lastname} #{suffix}<br/>#{street0}<br/>#{street1}<br/>#{street2}<br/>#{street3}<br/>#{postcode} #{city}<br/>#{country_id}<br/>Tel: #{telephone}<br/>Fax: #{fax}]]>
<defaultFormat>
<![CDATA[#{company}<br/>#{prefix} #{firstname} #{middlename} #{lastname} #{suffix}<br/>#{street0}<br/>#{street1}<br/>#{street2}<br/>#{street3}<br/>#{postcode} #{city}<br/>#{country_id}<br/>Tel: #{telephone}<br/>Fax: #{fax}]]>
</defaultFormat>
</js_template>
</address_templates>
Expand Down
65 changes: 44 additions & 21 deletions src/app/code/community/FireGento/GermanSetup/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,14 @@
</groups>
</general>
<checkout>
<groups>
<options>
<fields>
<groups>
<options>
<fields>
<display_additional_information translate="label,comment" module="germansetup">
<label>Display Additional Information</label>
<comment>Display content from text field below at the checkout confirm page directly above the checkout button</comment>
<comment>Display content from text field below at the checkout confirm page directly above
the checkout button
</comment>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>500</sort_order>
Expand All @@ -326,33 +328,53 @@
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<depends>
<display_additional_information>1</display_additional_information>
<display_additional_information>1</display_additional_information>
</depends>
</additional_information>
</fields>
</options>
<cart>
<fields>
<hide_shipping translate="label" module="germansetup">
</fields>
</options>
<cart>
<fields>
<hide_shipping translate="label,comment" module="germansetup">
<label>Hide estimated shipping costs in cart</label>
<comment>Replace with a link to the shipping costs cms page</comment>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>500</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</hide_shipping>
</fields>
</cart>
</groups>
</fields>
</cart>
</groups>
</checkout>
<sales>
<groups>
<reorder>
<fields>
<hide_sidebar_box translate="label" module="germansetup">
<label>Hide box "Last Ordered Items"</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>500</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</hide_sidebar_box>
</fields>
</reorder>
</groups>
</sales>
<google>
<groups>
<analytics>
<fields>
<ip_anonymization translate="label, comment">
<label>Ip anonymization</label>
<comment>Ensures that the ip address of the customers doesnt get involved into the tracking</comment>
<comment>Ensures that the ip address of the customers doesnt get involved into the
tracking
</comment>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>190</sort_order>
Expand All @@ -365,22 +387,23 @@
</groups>
</google>
<tax>
<groups>
<classes>
<fields>
<groups>
<classes>
<fields>
<shipping_tax_on_product_tax translate="label,comment" module="germansetup">
<label>Dynamic Shipping Tax Class Calculation</label>
<comment><![CDATA[Set to "yes" if you want to calculate the shipping tax rate based on the highest product tax rate or according to the tax rate of products that make up the biggest amount in cart.<br /><b>ATTENTION:</b> This setting overwrites the "Tax Class for Shipping" setting above!]]></comment>
<comment>
<![CDATA[Set to "yes" if you want to calculate the shipping tax rate based on the highest product tax rate or according to the tax rate of products that make up the biggest amount in cart.<br /><b>ATTENTION:</b> This setting overwrites the "Tax Class for Shipping" setting above!]]></comment>
<frontend_type>select</frontend_type>
<source_model>germansetup/source_tax_dynamicType</source_model>
<sort_order>11</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</shipping_tax_on_product_tax>
</fields>
</classes>
</groups>
</fields>
</classes>
</groups>
</tax>
</sections>
</config>
14 changes: 11 additions & 3 deletions src/app/design/frontend/base/default/layout/germansetup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@
</germansetup_frontend_agreements>

<checkout_cart_index>
<reference name="checkout.cart">
<action method="unsetChild" ifconfig="checkout/cart/hide_shipping">
<name>shipping</name>
<reference name="checkout.cart.shipping">
<action method="setTemplate" ifconfig="checkout/cart/hide_shipping">
<template>germansetup/shipping.phtml</template>
</action>
</reference>
</checkout_cart_index>
Expand Down Expand Up @@ -502,4 +502,12 @@
template="germansetup/checkout/additional.phtml"/>
</reference>
</checkout_multishipping_overview>

<customer_logged_in>
<reference name="right">
<action method="unsetChild" ifconfig="sales/reorder/hide_sidebar_box">
<name>sale.reorder.sidebar</name>
</action>
</reference>
</customer_logged_in>
</layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* This file is part of the FIREGENTO project.
*
* FireGento_GermanSetup is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This script is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* PHP version 5
*
* @category FireGento
* @package FireGento_GermanSetup
* @author FireGento Team <[email protected]>
* @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 shipping cost link
*
* @category FireGento
* @package FireGento_GermanSetup
* @author FireGento Team <[email protected]>
* @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_Checkout_Block_Cart_Shipping
*/
?>

<?php $shippingCostUrl = Mage::helper( 'germansetup' )->getShippingCostUrl() ?>
<?php if( !empty( $shippingCostUrl )): ?>
<div class="shipping">
<h2><?php echo $this->__('Shipping Costs') ?></h2>
<p><a href="<?php echo $shippingCostUrl ?>"><?php echo $this->__('Here you find information regarding the shipping costs.') ?></a></p>
</div>
<?php endif ?>
6 changes: 5 additions & 1 deletion src/app/locale/de_DE/FireGento_GermanSetup.csv
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,8 @@
"Tax Settings","Steuer-Einstellungen"

"Delivery Time","Lieferzeit"
"Hide estimated shipping costs in cart","Geschätzte Versandkosten im Warenkorb verstecken"
"Shipping Costs","Versandkosten"
"Hide estimated shipping costs in cart","Geschätzte Versandkosten im Warenkorb verstecken"
"Replace with a link to the shipping costs cms page","Mit einem Link zur CMS-Seite ""Versandkosten"" ersetzen"
"Here you find information regarding the shipping costs.","Hier finden Sie Informationen zu den Versandkosten."
"Hide box ""Last Ordered Items""","Box ""Zuletzt bestellte Artikel"" verstecken"

0 comments on commit bec545c

Please sign in to comment.