Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / display a new price with discount

display a new price with discount

Locked

Views: 2,133

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Aug 2006, 6:25 PM
#1
sospcshop avatar

sospcshop

New Zenner

Join Date:
Mar 2005
Posts:
30
Plugin Contributions:
0

display a new price with discount

Hi, i have a little problem with tpl_product_info.

My problem is that i want to display in product info a new price with 3% of discount (for who buy with moneyorder).

can see on http://www.sospcshop.com/store/nb-asus-a6fap038p-dualcore-t2300e-166-1024mb-154colsh-dvdsmdl-100gb5400rpm-wl-gblan-bt-xpp-w-p-4142.html

so i wish show 2price..

(if you buy by cod is the 1° price, if buy by moneyorder is 2° price)

1 normal price; the second is the price of first - 3%

I have try to do it but does not work correctly... (put many decimal and for prices > 999 show 0.ecc,)

I have added
zen_get_products_display_price((int)$_GET['products_id'])/1.03

can someone help me?

Thanks...

bye !

16 Aug 2006, 6:36 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: display a new price with discount

You could use an Orders Total module to allow the discount on the total of the order when Money Order is used ...

You might look into the Global Discount module that dreamscape made and add a condition to only allow it to apply based on the Payment Module that is picked ...

16 Aug 2006, 7:13 PM
#3
sospcshop avatar

sospcshop

New Zenner

Join Date:
Mar 2005
Posts:
30
Plugin Contributions:
0

Re: display a new price with discount

thanks Ajeh ..

I have alredy done a module that make discount based on payment module (adapted from cod_fee).

I wish a more symple thing..
I want to see in product info both the normal price and the price with the discount..

"regular price" €10.00Euro if buy with moneyorder -3% €9.70

I hope you understand my English...

many thanks !!

Bye !

17 Aug 2006, 6:32 PM
#4
sospcshop avatar

sospcshop

New Zenner

Join Date:
Mar 2005
Posts:
30
Plugin Contributions:
0

Re: display a new price with discount

I see that nobody knows how to do it !!!

pazienza...

17 Aug 2006, 6:37 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: display a new price with discount

This would take quite a bit of coding if this is the 2nd item purchased when only Money Order is used ...

What happens if they buy 3? 4? 27?

Or are you saying 2nd price is because of Money Order on full order so it is total order - 3% when Money Order is used?

If so, then just use the module I suggested before and adapt it to only work on Money Order ...

18 Aug 2006, 6:34 PM
#6
sospcshop avatar

sospcshop

New Zenner

Join Date:
Mar 2005
Posts:
30
Plugin Contributions:
0

Re: display a new price with discount

Hi

I have found a similar problem in forum and solved so:

Normal price..

and after...

$withtax=zen_get_products_display_price((int)$_GET['products_id']);
$withtax=ereg_replace(',','',$withtax);//removes commas from thousands

echo '<br />'.'<span style="font-size:14px">';
printf ("%01.2f", round($withtax -(($withtax * 3)/100),2));
echo 'EUR'.'</span>'
?>
<span class="Stile49"> -3% (Pagamento anticipato) </span>

Thanks for interesting.

Bye !