Pagina 1 di 1

Make an Offer - Contribution

Inviato: 19/09/2005, 14:53
da kikoleppard
Bass, Itan80,

mi rivolgo prima verso di vuoi anche verso gli altri. Qualcuno di vuoi ha provato questa Contrib

Make an Offer 1.0


Il problemma e in un punto nelle istruzioni. L'ho riletto 10 volte, ho guardato la logica ne codice nel file e non ho capito esattamente che cosa devo fare.

Eccovi le Istruzioni.

6) Add to catalog/shopping_cart.php

// Addition for Make An Offer
$rate = $currencies->currencies[$currency]['value'];
if (MAO_ACCEPT_OFFER_DIRECTLY == 'true') {
if (tep_session_is_registered('mao_accepted_offer')) {
for ($k=0, $l=sizeof($_SESSION['mao_accepted_offer']); $k<$l; $k++) {
$pos = strpos($products[$i]['id'],"{");
if ($pos === false) {
if ($products[$i]['id'] == $_SESSION['mao_accepted_offer'][$k]['productid']) {
// Check for valuta change after an offer already has been made
if (strcasecmp($_SESSION['mao_accepted_offer'][$k]['initialvaluta'],$currency) == 0) {
// Valuta is the original valuta for the offer
// We have to calculate back first as the currency class will
// alwasy do a rate multiply. This is neccessary in case an offer
// has been made in a non-default currency
$products[$i]['final_price'] = mao_priceoffer($_SESSION['mao_accepted_offer'][$k]['newprice'])/$rate;
} else {
// Neccessary to keep the correct amount if a customer
// switches between different valuta
$products[$i]['final_price'] = mao_priceoffer($_SESSION['mao_accepted_offer'][$k]['newprice'])*(1/$currencies->currencies[$_SESSION['mao_accepted_offer'][$k]['initialvaluta']]['value']);
}
break;
}
} else {
if (substr($products[$i]['id'],0,$pos) == $_SESSION['mao_accepted_offer'][$k]['productid']) {
// Check for valuta change after an offer already has been made
if (strcasecmp($_SESSION['mao_accepted_offer'][$k]['initialvaluta'],$currency) == 0) {
// Valuta is the original valuta for the offer
// We have to calculate back first as the currency class will
// alwasy do a rate multiply. This is neccessary in case an offer
// has been made in a non-default currency
$products[$i]['final_price'] = mao_priceoffer($_SESSION['mao_accepted_offer'][$k]['newprice'])/$rate + $cart->attributes_price($products[$i]['id']);
} else {
// Neccessary to keep the correct amount if a customer
// switches between different valuta
$products[$i]['final_price'] = mao_priceoffer($_SESSION['mao_accepted_offer'][$k]['newprice'])*(1/$currencies->currencies[$_SESSION['mao_accepted_offer'][$k]['initialvaluta']]['value']) + $cart->attributes_price($products[$i]['id']);
}
break;
}
}
}
}
}

after

$products_name .= ' </td>' .
' </tr>' .
'</table>';

SPECIAL NOTE: For all changes in the catalog/shopping_cart.php it is important to
remember that if you use any special reduction contribution like TotalB2B, CCGV etc.
the place to put the MAO code may differ from the above !! As a general rule the
offered price should be injected AFTER any other price manipulation otherwise the
reduction will be calculated based on the offered price and not the original price.
If that is what you want however it is fine to place the MAO code before other
price manipulations.
Beh, mi potete dare una dirita se qualcuno l'ha installato con successo.
Non posso capire dove di cercare a mettere questo codice. Prima o dopo della manipolazione prezzo di Total B2B?

Ciao vi ringrazio in anticipi e a dopo.

[/b]

Re: Make an Offer - Contribution

Inviato: 19/09/2005, 14:58
da Bass
kikoleppard ha scritto: Beh, mi potete dare una dirita se qualcuno l'ha installato con successo.
Non posso capire dove di cercare a mettere questo codice. Prima o dopo della manipolazione prezzo di Total B2B?
Non l'ho mai messa, comunque dalle istruzioni devi metterla dopo gli altri codici, ad esempio dopo la B2B

'iao

Sergio

Re: Make an Offer - Contribution

Inviato: 19/09/2005, 18:36
da kikoleppard
Bass ha scritto:
kikoleppard ha scritto: Beh, mi potete dare una dirita se qualcuno l'ha installato con successo.
Non posso capire dove di cercare a mettere questo codice. Prima o dopo della manipolazione prezzo di Total B2B?
Non l'ho mai messa, comunque dalle istruzioni devi metterla dopo gli altri codici, ad esempio dopo la B2B

'iao

Sergio
Grazie,

cosi pensavo anch'io ma volevo ottenere qualche consiglio di qualcuno.

L'ultima frase in neretto mi ha confuso, ognitanto no capisco bene il senso.

Ciao

Inviato: 20/09/2005, 4:37
da kikoleppard
Bass,

ho lasciato perdere. Per una piccola funzionalità è troppo pesante la Contrib.

Lasciamo da parte Total B2B il mio problemma è stato che in
application_top.php

case 'add_product' : e abbastanza modificato e non mi andava a pensarci di adattare qualcosa.
Make an Offer
lo complicava ulteriormente e allora ho rinunciato.

Ciao