Skip to content

Commit

Permalink
adapted to CE 4.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
vendingtechnik committed Jan 21, 2015
1 parent a64bdba commit 651b935
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 0 deletions.
@@ -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&uuml;ltige Versandkostenregel gefunden',
'DELIVERYSETCHECK_PAYMENTS_ERROR' => 'Keine g&uuml;ltige Zahlungsweise gefunden',
'DELIVERYSETCHECK_ACTIVESHPPINGESET_ERROR' => 'Keine aktive Versandart gefunden',

);
@@ -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',

);
@@ -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 );
}
}
Binary file added oxid_4.9_xx/deliverysetcheck/deliverysetcheck.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions oxid_4.9_xx/deliverysetcheck/metadata.php
@@ -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',
),
);

0 comments on commit 651b935

Please sign in to comment.