products module - how to show discount prices

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
jd447
Forum Members
Forum Members
Posts: 134
Joined: Wed Jun 20, 2007 7:06 am
Location: geneva

products module - how to show discount prices

Post by jd447 »

Hi everyone,

I would like to show discounted prices next to the initial prices (with the product module.)

so far, i tried to do that with the promotion module, but it seems that i can only show the discounted prices once the customers orders the product. but i don't want to sell the products online.

in short, what i need:

- show different products with their price (i did that with the product module)
- be able to show discounted price for a chosen time

what i don't need:

- any ecommerce features (orders, payment,...)

is there a way to trick the promotion module?

thanks for your help (again and again... :)

jd
________________________
http://www.pixinside.ch
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

Re: products module - how to show discount prices

Post by pedes »

you just want to show the discount price you don't want to work with it ?

then you can assign a new var in the products template and then and show this var next to the shopping price

something like this if you would like to give a global 10% discount:
{assign var='price_with discount'  value=$entry->price-$entry->price*0.10}

then you put {$price_with_discount} next to the original price or somewhere where you want to see it ..

Kind regards
Peter
Last edited by pedes on Thu Nov 04, 2010 3:09 pm, edited 1 time in total.
User avatar
jd447
Forum Members
Forum Members
Posts: 134
Joined: Wed Jun 20, 2007 7:06 am
Location: geneva

Re: products module - how to show discount prices

Post by jd447 »

thanks peter!
simple and pretty clever. what i did:

Code: Select all

Price {$currency_symbol}: {$entry->price}<br />
Discount {$currency_symbol}: {$entry->price*0.6}<br />
But, what would be nice is to have a way to make this promotion limited in time.
but at least i have a solution! crazy i didn't think about that one! :)
________________________
http://www.pixinside.ch
pedes
Power Poster
Power Poster
Posts: 840
Joined: Tue Jan 27, 2009 11:47 am

Re: products module - how to show discount prices

Post by pedes »

limited in time would be a big code change i think  :-\

but what you could do is make a checkbox field in the products detail en let this be the switch if you want to have the discount visible for that product or not

you want to let it visible then you check the box in the product detail or you want to hide it uncheck the box.
in this way you can even make many checkboxes ... one for for every discount rate ... so then you can have different discount rates for different products

Kind regards
Peter
Last edited by pedes on Thu Nov 04, 2010 3:37 pm, edited 1 time in total.
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: products module - how to show discount prices

Post by maranc »

Hi, maybe better solution is set different discount for each product, ex. create text field named discount_product, when you can put discount for this products. You can read value from this field by: {$entry->fields.product_discount->value}. Such as wrote Pedes next you can create field like checkbox or better dropdown (my sugestion) when you can put ex. global_discount for all products (in percent, ammount as you want...). Next in smarty you can make condition like:

{assing var=global_discount value='$entry->fields.global_discount->value'}

{if isset($global_discount) && $global_discount->value ne ''}
.... do somthing
{else}
.... use in code value {$entry->fields.products_discount->value}
{/if}

In first - you will be use global discount, in second, when global discount isn't used for this products you can use individual discount form field value.

BTW - setting time for discount you can make with javascript, I dont remember but I saw jquery plugin, witch check date and can make any action...

Marek A.
Post Reply

Return to “Modules/Add-Ons”