MiniVend Akopia Services

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

Calculating subtotal, total-cost, etc by hand



******    message to minivend-users from lee@netguide.net     ******


  I have a situation where a product's price is dependant on the user who
is logged in (using UserDB).  I have a MySQL table set up which is keyed
on product_id and access_level and has a price value. e.g.

  product_id	access_level	price
  A0001		1		10.00
  A0001		2		15.00
  A0002		1		20.00
  A0002		2		30.00
  ...		...		...

  etc.

  Obviously, [item-price] et al don't work, but this has been ok so far as
I've been doing the required SQL lookups to show prices while browsing.

  My problems are now that I have reached the checkout stage.  [subtotal],
[total-cost] don't work either (presumably because minivend hasn't been
able to lookup the price in the manner in which it expects), and I'm
guessing that I am going to be forced to emulate these tags on this page
using [calc] or [perl] or some usertag or something.  Trouble is, I'm not
sure how to do this. :)

  Has anyone done this before or have any pointers on how I can do this?

  Regards,
          Lee.

  P.S. Mike, are there any plans in the future to add support for having
prices come from a different table than the products?  Even a PriceField
syntax like

PriceField prices::price

  where prices has been defined as a database with the Database directive
would be fantastic.  This doesn't help me in my current situation, but I
imagine it's something that could be used by a lot of people, especially
when using minivend with large established product databases which quite
commonly have pricing information separate from other product information.

--
Lee Hamilton
Systems Administrator
lee@netguide.net


-
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: