Jump to content
xt:Commerce Community Forum

Kundengruppen/Staffelrpreise - Problem nach Update


Recommended Posts

Hallo !

Ich habe nach dem Update auf Version 6.3.2 ein Problem mit den Kundengruppen/Staffelpreisen:

Die hinterlegten Staffelpreise für unterschiedliche Kundengruppen werden nicht mehr berücksichtigt, da anscheinend es nicht mehr möglich ist einen Staffelpreis ab einer Stückzahl 1 anzubieten. Wenn ich das entsprechende Fenster öffne, ist das Feld "Mengengrenze" ROT unterlegt (ERROR_REGEX).

grafik.png.d85ee411e28e4a2038aecd6e647af891.png

Bisher war dies kein Problem.
Ich konnte damit jahrelang einen Artikel der entsprechenden Kundengruppe zu dem hinterlegten Preis verkaufen.

Dies ist jetzt nicht mehr möglich. Jeder Kunde bekomt jetzt den im Artikel hinterlegten Originalpreis angezeigt.

Mir ist klar, dass dies in der jetzigen Form logischer ist, da ein Staffelpreis ja erst ab einem mehrfachen von 1 gelten sollte, aber ich habe das halt so genutzt und es hat ja auch funktioniert.
Mit dem jetzigen Update scheint dies nicht mehr möglich zu sein.?

Oder gibt es irgendwo eine Einstellung, dass auch die Mengengrenze 1 als Staffelpreis erlaubt ist?

 

Hier ein Bildschrimfoto von den verschiedenen Staffelpreisen für die unterschiedlichen Kundengruppen:

grafik.thumb.png.4fb6e0f658f623c84811ddc48c4d7e3f.png
Dies ist für hunderte Artikel so hinterlegt. (Der erste Artikel mit dieser Konfiguration wurde immer wieder kopiert)

Es handelt sich um einen reinen B2B Shop. Nicht für den Endkunden - nur falls dies wichtig ist.


Wäre toll wenn da jemand helfen könnte. DANKE.

Beste Grüße
G. Klocke

 

Link to comment
Share on other sites

Hallo G. Klocke,

ich benutze den Staffelpreis auf genau die gleiche Art und weise wie du.

Ich steuer damit die Preise für eine andere Kundengruppe. Und das auch mit der Menge 1.

Ich habe noch die 6.2.2. und es klappt perfekt. Ich habe das Update auf 6.3.2 in 4 bis 6 Wochen geplant.

Ich hoffe das wird behoben.

Es wäre nett wenn du hier posten würdest wie und ob das Problem beseitigt wurde.

LG

Homer

Link to comment
Share on other sites

hallo,

habe den Sachverhalt auch auch xtc gemeldet.

Abhilfe:

in der class.products_price.php auskommentieren:

$header['discount_quantity'] = ['regex' => '^(?:[2-9]|\d\d\d*)$'];

Dann kann man wieder die 1 eingeben.

Leider reicht das nicht ... habe deshalb Hookpoint zu beliebigem Plugin hinzugefügt:

HOOK: class.product.php:getGroupPrice_top

INHALT:

$prices = array();
if ($customers_status->customers_status_graduated_prices != 0) {
if ($sp_type=='group') {
$record = $db->Execute("SELECT * FROM ".TABLE_PRODUCTS_PRICE_GROUP.$price->p_group." 
WHERE products_id=? ORDER BY discount_quantity ASC",array($this->data['products_id']));
} else {
$record = $db->Execute("SELECT * FROM ".TABLE_PRODUCTS_PRICE_GROUP."all 
WHERE products_id=? ORDER BY discount_quantity ASC",array($this->data['products_id']));
}
 
if ($record->RecordCount() >= 1) {
$single_price = $this->data['products_price_db'];
 
if (is_null($single_price) && !is_array($this->data['products_price'])) {
$single_price = $this->data['products_price'];
} else if(is_array($this->data['products_price'])) {
$single_price = $this->data['products_price']['plain_otax'];
}
 
if ($special_price) {
$single_price = $special_price;
}
 
$prices[] = array('qty'=>1,'price'=>$single_price);
 
while (!$record->EOF) {
if ($record->fields['discount_quantity']!=0) {
$prices[] = array('qty'=>$record->fields['discount_quantity'],'price'=>$record->fields['price']);
} else if ($record->fields['discount_quantity']!=1) {
$prices[0] = array('qty'=>1,'price'=>$record->fields['price']);
}
$record->MoveNext();
}
 
$record->Close();
 
$qty = $this->qty;
if ($qty_force!=-1) $qty = $qty_force;
$data = array();
 
for ($i = 0, $n = sizeof($prices); $i < $n; $i++) {
if ($prices[$i+1]['qty']>$qty) {
$data['price']=$prices[$i]['price'];
break;
} else {
// kleiner
if (!isset($prices[$i+1]['qty'])) {
$data['price']=$prices[$i]['price'];
break;
} else {
if ($prices[$i+1]['qty']>$this->qty) {
$data['price']=$prices[$i]['price'];
break;
}
}
}
}
 
if (count($prices) == 2 && $prices[1]['qty'] == 1) {
$data['price']=$prices[1]['price'];
unset($prices[0]);
$prices[0] = $prices[1];
unset($prices[1]);
}
 
$data['no_graduated']=0;
$data['graduated_single']=0;
//only one check rule
 
if (sizeof($prices) == 1 && $prices[0]['qty']<2) {
for ($i = 0, $n = sizeof($prices); $i < $n; $i++) {
$prices[$i]['price'] = $price->_calcCurrency($prices[$i]['price']);
}
$data['no_graduated']=1;
$data['graduated_single']=1;
} else {
for ($i = 0, $n = sizeof($prices); $i < $n; $i++) {
$prices[$i]['price'] = $price->_calcCurrency($prices[$i]['price']);
}
$data['prices']=$prices;
$size = count($prices);
if ($size==0) $data['no_graduated']=1;
 
//$last = array_pop($prices);
$data['cheapest'] = $prices[$size-1]['price'];
}
 
($plugin_code = $xtPlugin->PluginCode('class.product.php:getGroupPrice_data')) ? eval($plugin_code) : false;
$plugin_return_value = $data;
 
return $plugin_return_value;
} else {
return false;
}
} else {
return false;
}

 

Grüsse

 

Link to comment
Share on other sites

4 hours ago, oldbear said:

in der class.products_price.php auskommentieren:

 

Hallo !

Danke für die Nachricht und den Lösungsweg.

Leider bin ich nicht ganz so firm darin. 
Wo finde ich die "class.products_price.php" ? Eine Serversuche ergab leider kein Ergebnis bei mir.

Auskommentieren heißt die Zeile einfügen oder ersetzen ?

Danke schon mal.

Beste Grüße
G.Klocke

 

Link to comment
Share on other sites

hallo,

habe den Sachverhalt auch auch xtc gemeldet.

Abhilfe:

in der class.products_price.php auskommentieren:

$header['discount_quantity'] = ['regex' => '^(?:[2-9]|\d\d\d*)$'];

Dann kann man wieder die 1 eingeben.

Leider reicht das nicht ... habe deshalb Hookpoint zu beliebigem Plugin hinzugefügt:

HOOK: class.product.php:getGroupPrice_top

INHALT:

$prices = array();
if ($customers_status->customers_status_graduated_prices != 0) {
if ($sp_type=='group') {
$record = $db->Execute("SELECT * FROM ".TABLE_PRODUCTS_PRICE_GROUP.$price->p_group." 
WHERE products_id=? ORDER BY discount_quantity ASC",array($this->data['products_id']));
} else {
$record = $db->Execute("SELECT * FROM ".TABLE_PRODUCTS_PRICE_GROUP."all 
WHERE products_id=? ORDER BY discount_quantity ASC",array($this->data['products_id']));
}
 
if ($record->RecordCount() >= 1) {
$single_price = $this->data['products_price_db'];
 
if (is_null($single_price) && !is_array($this->data['products_price'])) {
$single_price = $this->data['products_price'];
} else if(is_array($this->data['products_price'])) {
$single_price = $this->data['products_price']['plain_otax'];
}
 
if ($special_price) {
$single_price = $special_price;
}
 
$prices[] = array('qty'=>1,'price'=>$single_price);
 
while (!$record->EOF) {
if ($record->fields['discount_quantity']!=0) {
$prices[] = array('qty'=>$record->fields['discount_quantity'],'price'=>$record->fields['price']);
} else if ($record->fields['discount_quantity']!=1) {
$prices[0] = array('qty'=>1,'price'=>$record->fields['price']);
}
$record->MoveNext();
}
 
$record->Close();
 
$qty = $this->qty;
if ($qty_force!=-1) $qty = $qty_force;
$data = array();
 
for ($i = 0, $n = sizeof($prices); $i < $n; $i++) {
if ($prices[$i+1]['qty']>$qty) {
$data['price']=$prices[$i]['price'];
break;
} else {
// kleiner
if (!isset($prices[$i+1]['qty'])) {
$data['price']=$prices[$i]['price'];
break;
} else {
if ($prices[$i+1]['qty']>$this->qty) {
$data['price']=$prices[$i]['price'];
break;
}
}
}
}
 
if (count($prices) == 2 && $prices[1]['qty'] == 1) {
$data['price']=$prices[1]['price'];
unset($prices[0]);
$prices[0] = $prices[1];
unset($prices[1]);
}
 
$data['no_graduated']=0;
$data['graduated_single']=0;
//only one check rule
 
if (sizeof($prices) == 1 && $prices[0]['qty']<2) {
for ($i = 0, $n = sizeof($prices); $i < $n; $i++) {
$prices[$i]['price'] = $price->_calcCurrency($prices[$i]['price']);
}
$data['no_graduated']=1;
$data['graduated_single']=1;
} else {
for ($i = 0, $n = sizeof($prices); $i < $n; $i++) {
$prices[$i]['price'] = $price->_calcCurrency($prices[$i]['price']);
}
$data['prices']=$prices;
$size = count($prices);
if ($size==0) $data['no_graduated']=1;
 
//$last = array_pop($prices);
$data['cheapest'] = $prices[$size-1]['price'];
}
 
($plugin_code = $xtPlugin->PluginCode('class.product.php:getGroupPrice_data')) ? eval($plugin_code) : false;
$plugin_return_value = $data;
 
return $plugin_return_value;
} else {
return false;
}
} else {
return false;
}

 

Grüsse

 

hallo,

das ist die xtFramework(classes/class.product_price.php

Auskommentieren oder löschen ist egal, nur weg mit ...

Grüsse

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
  • Create New...