Akopia Akopia Services

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

Re: [mv] Please answer, Shiping prices per item



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



Ben-Nes Michael wrote:
> 
> ******    message to minivend-users from Ben-Nes Michael <miki@canaan.co.il>     ******
> 
> This sound as a good solution.
> Can I driven the values from database ?
> I don't want to put 100 arrays in the body of the carts, its will be huge waste of memory and cpu power to put in memory all the arrays.

I've been doing some more thinking about this and I don't think the perl
approach is necessary. 

I would think you would be able to do this but as I said, I'm not really
sure how one goes about doing it. My feeling is that you could create a
database using the  product type as the key. Along the x axis you'd have
the quantities.

	1	2	3	4	5	6
foo	1	1	1	2	2	2
bar	3	3	4	4	5	5
bix  	8	8	12	12	16	16
box	1	1	3	5	5	5

It would then be a matter of a table lookup done on a per item basis. In
fact if you did it this way you should be able to do the whole thing in
minivend tags. Just wrap it inside of an item-list. 

Again, the pseudo code isn't nearly close to what is the correct syntax
but something like.
[item-list]
[seti itemship][data table=shipping column="[item-list quantity]"
key="[item-list code]"][/seti]
[i'm assuming there is some sort of addition operator but I just don't
remember it right now. alternatively you can define an entry in the
shopping cart items list for shipping. You then plug the queried
shipping value into this field. That way you can track how much it costs
to ship each item type. I remember there is a tag for tallying a column
so you could use that and pop the total into your ordersheet.]
[/item-list]

Again, I've only done one site in minivend and I'm not all that good at
it. I don't see why this wouldn't work reasonably well but the approach
might be fundamentally flawed. 

Good luck.
-
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: