Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] customer specific pricing



******    message to minivend-users from Chris Rapier <rapier@psc.edu>     ******

I do this in two ways:

If the prices are not a strict percentage then you'll need two price
lists. 

1) Simply setup an additional price list in your products.db
2) add
   Locale          en_FRIENDS PriceField          altprice
   to your catalog config.
3) add a disc_type (discount type) field to your user database.
4) pick a value for that field that identifies these special people (I
used "friend").
4) include
   [setlocale locale=en_US currency=en_US persist=1]
   [seti disc_type][data table="userdb" column="discount" key="[value
mv_username]"][/seti]   
   [if scratch disc_type =~ /friend/i]                        
       [setlocale locale=en_FRIENDS currency=en_US
persist=1]               
   [/if]
   on one of your pages. The 'results' equivilant page is usually good.
That way they
   only see the discount price. 
NB: Persist *should* *supposedly* *it is rumoured* to enforce the
specified locale for the entire user session. It hasn't worked that way
for me. I've had to include this code on any page with prices on it.
c'est la vie.

Obviously you'll need to have a user database and login foo setup to do
it this way

If the new prices are just a flat percentage (in this case 10%) then you
can:
1) Add a disc_type field to your userdata base and pick an identifier
2) Add the following to a page
   [seti disc_type][data table="userdb" column="discount" key="[value
mv_username]"][/seti]              
   [if scratch disc_type eq "friend"]   
       [discount ALL_ITEMS] $s * .9 [/discount]
   [/if]
   To a page. If you have one postlogin page that woudl be a good place
to put it.
3) Show the discount with [price code="[item-code]" discount=1]

You can also use the CommonAdjust solution.

Both of the above solutions are foudn in the documentation. Do a search
on 'discount'.

As with everything associated with perl there are 19 million ways of
doing the same thing. My way probably isn't the most effecient (I could
probably just use
[if data userdb::disc_type::"[value mv_username]"] instead of the seti
and then the if
but I haven't had the time to really play yet.)

Chris


John White wrote:
> 
> ******    message to minivend-users from John White <johnjohn@triceratops.com>     ******
> 
> Is it possible to implement customer specific pricing in minivend?
> 
> I have a set of list prices, but also some key customers who I want
> to give special pricing to ... always.  Like, 50 of them. :)
> 
> John
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: