forked from leofonic/deliverysetcheck
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a64bdba
commit 651b935
Showing
5 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
oxid_4.9_xx/deliverysetcheck/application/translations/de/deliverysetcheck_lang.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
$sLangName = "Deutsch"; | ||
$aLang = array( | ||
'charset' => 'ISO-8859-15', | ||
|
||
'DELIVERYSETCHECK_SHIPPINGMETHODS' => 'Versandarten:', | ||
'DELIVERYSETCHECK_SHIPPINGMETHOD_OK' => 'Versandart OK', | ||
'DELIVERYSETCHECK_SHIPPINGRULES_ERROR' => 'Keine gültige Versandkostenregel gefunden', | ||
'DELIVERYSETCHECK_PAYMENTS_ERROR' => 'Keine gültige Zahlungsweise gefunden', | ||
'DELIVERYSETCHECK_ACTIVESHPPINGESET_ERROR' => 'Keine aktive Versandart gefunden', | ||
|
||
); |
12 changes: 12 additions & 0 deletions
12
oxid_4.9_xx/deliverysetcheck/application/translations/en/deliverysetcheck_lang.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
$sLangName = "English"; | ||
$aLang = array( | ||
'charset' => 'ISO-8859-15', | ||
|
||
'DELIVERYSETCHECK_SHIPPINGMETHODS' => 'Shipping methods:', | ||
'DELIVERYSETCHECK_SHIPPINGMETHOD_OK' => 'Shipping method OK', | ||
'DELIVERYSETCHECK_SHIPPINGRULES_ERROR' => 'No valid Shipping Cost Rule found', | ||
'DELIVERYSETCHECK_PAYMENTS_ERROR' => 'No valid Payment method found', | ||
'DELIVERYSETCHECK_ACTIVESHPPINGESET_ERROR' => 'No active Shipping method found', | ||
|
||
); |
67 changes: 67 additions & 0 deletions
67
oxid_4.9_xx/deliverysetcheck/core/deliverysetcheck_oxdeliverysetlist.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/* | ||
Fastcheck for Deliverysets (Order Step 3) | ||
Author: Frank Zunderer (www.zunderer.de) | ||
Version: 1.0 (OXID 4.6.x) | ||
*/ | ||
class deliverysetcheck_oxdeliverysetlist extends deliverysetcheck_oxdeliverysetlist_parent{ | ||
public function getDeliverySetData( $sShipSet, $oUser, $oBasket ) | ||
{ | ||
$sActShipSet = null; | ||
$aActSets = array(); | ||
$aActPaymentList = array(); | ||
|
||
if (!$oUser) { | ||
return; | ||
} | ||
|
||
$this->_getList( $oUser, $oUser->getActiveCountry() ); | ||
|
||
// if there are no shipsets we dont need to load payments | ||
if ($this->count() ) { | ||
|
||
// one selected ? | ||
if ( $sShipSet && !isset( $this->_aArray[$sShipSet] ) ) { | ||
$sShipSet = null; | ||
} | ||
|
||
/*$oPayList = oxPaymentList::getInstance(); | ||
$oDelList = oxDeliveryList::getInstance(); */ | ||
|
||
$oPayList = oxRegistry::get("oxPaymentList"); | ||
$oDelList = oxRegistry::get("oxDeliveryList"); | ||
|
||
$oCur = $this->getConfig()->getActShopCurrencyObject(); | ||
$dBasketPrice = $oBasket->getPriceForPayment() / $oCur->rate; | ||
|
||
$deldbg .= '<font color="red">'.oxRegistry::getLang()->translateString('DELIVERYSETCHECK_SHIPPINGMETHODS').'</font> '; | ||
|
||
// checking if these ship sets available (number of possible payment methods > 0) | ||
foreach ( $this as $sShipSetId => $oShipSet ) { | ||
$deldbg .= '<br /><font color="red">'.$oShipSet->oxdeliveryset__oxtitle.':</font>'; | ||
$aPaymentList = $oPayList->getPaymentList( $sShipSetId, $dBasketPrice, $oUser ); | ||
|
||
if ( count( $aPaymentList ) ) { | ||
|
||
// now checking for deliveries | ||
if ( $oDelList->hasDeliveries( $oBasket, $oUser, $oUser->getActiveCountry(), $sShipSetId ) ) { | ||
$aActSets[$sShipSetId] = $oShipSet; | ||
|
||
if ( !$sShipSet || ( $sShipSetId == $sShipSet ) ) { | ||
$sActShipSet = $sShipSet = $sShipSetId; | ||
$aActPaymentList = $aPaymentList; | ||
$oShipSet->blSelected = true; | ||
} | ||
$deldbg .= oxRegistry::getLang()->translateString('DELIVERYSETCHECK_SHIPPINGMETHOD_OK'); | ||
} | ||
else $deldbg .= oxRegistry::getLang()->translateString('DELIVERYSETCHECK_SHIPPINGRULES_ERROR'); | ||
} | ||
else $deldbg .= oxRegistry::getLang()->translateString('DELIVERYSETCHECK_PAYMENTS_ERROR'); | ||
} | ||
} | ||
else $deldbg .= oxRegistry::getLang()->translateString('DELIVERYSETCHECK_ACTIVESHPPINGESET_ERROR'); | ||
/* oxUtilsView::getInstance()->addErrorToDisplay( new oxException( $deldbg ) ); */ | ||
oxRegistry::get("oxUtilsView")->addErrorToDisplay( new oxException( $deldbg ) ); | ||
return array( $aActSets, $sActShipSet, $aActPaymentList ); | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
$aModule = array( | ||
'id' => 'deliverysetcheck', | ||
'title' => 'Deliveryset-Check', | ||
'description' => array( | ||
'de'=>'Überprüfung der Versandarten und -Regeln<br><br> | ||
<b>BENUTZUNG:</b><br><br> | ||
Bestellung ausführen bis Schritt 3. <br> | ||
Fehlerbehebung Versandarten:<br> | ||
<br> | ||
<b>1. Versandart wird überhaupt nicht angezeigt:</b><br> | ||
- für die Versandart Länder und Benutzer überprüfen<br> | ||
- im Zweifel bei Länder und Benutzer nichts zuordnen<br> | ||
- Versandart aktivieren<br> | ||
<br> | ||
<b>2. Keine gültige Zahlungsart gefunden:</b><br> | ||
bei allen Zahlungsarten die in der Versandart zugeordnet sind:<br> | ||
- Länder und Benutzergruppen überprüfen<br> | ||
- Bedingung Einkaufswert überprüfen (nicht 0-0)<br> | ||
- im Zweifel bei Länder nichts zuordnen und BEI BENUTZERGRUPPEN ALLE AUSSER BLOCKED UND BLACKLIST ZUORDNEN<br> | ||
- Zahlungsart aktivieren<br> | ||
<br> | ||
<b>3. Keine gültige Versandkostenregel gefunden:</b><br> | ||
bei allen Versandkostenregeln die in der Versandart zugeordnet sind:<br> | ||
- Benutzer, Artikel und Länderzuordnungen überprüfen<br> | ||
- im Zweifel keine Benutzer, Artikel und Länder zuordnen<br> | ||
- Bedingung überprüfen (nicht 0-0)<br> | ||
- Versandkostenregel aktivieren', | ||
'en'=>'Checks the Deliverysets and -rules<br><br> | ||
<b>HOW TO USE:</b><br><br> | ||
Complete Order until Step 3. <br> | ||
Troubleshooting Errors:<br> | ||
<br> | ||
<b>1. Shipping method is not displayed at all:</b><br> | ||
- Check Countries and Users assigned to the Shipping method<br> | ||
- If you\'re not certain do not assign any Countries and Users<br> | ||
- activate Shipping method<br> | ||
<br> | ||
<b>2. No valid Payment method found:</b><br> | ||
for all Payment methods assigned to the Shipping method:<br> | ||
- Check Countries and Users assigned to the Payment method<br> | ||
- Check if the condition is valid (not 0-0)<br> | ||
- If you\'re not certain do not assign any Countries, ASSIGN ALL USERGROUPS EXCEPT BLOCKED AND BLACKLIST<br> | ||
- activate Payment method<br> | ||
<br> | ||
<b>3. No valid Shipping Cost Rule found:</b><br> | ||
for all Shipping Cost Rules assigned to the Shipping method:<br> | ||
- Check Countries and Users assigned to the Shipping Cost Rule<br> | ||
- If you\'re not certain do not assign any Countries and Users/Groups<br> | ||
- Check if the condition is valid (not 0-0)<br> | ||
- activate Shipping Cost Rule', | ||
), | ||
'thumbnail' => 'deliverysetcheck.jpg', | ||
'version' => '1.0', | ||
'url' => 'http://zunderweb.de', | ||
'email' => 'info@zunderweb.de', | ||
'author' => 'Zunderweb', | ||
|
||
'extend' => array( | ||
'oxdeliverysetlist' => 'deliverysetcheck/core/deliverysetcheck_oxdeliverysetlist', | ||
), | ||
); |