Akopia Akopia Services

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

[mv] Re: minivend-users V1 #636



******    message to minivend-users from Jim Tom Polk <jtpolk@texas.net>     ******

I'm using Minivend 4.04, upgrading from Minivend 3.11.

I have a customer with 6 products where the total price per item varies
uniquely by item by one of three defined shipping area: Texas,
Contential US, and Alaska/Hawaii.

The price includes the product, any applicable taxes and shipping all
rolled into one.

The base price is for Texas, then additional amounts are added for
Contential US or Alaska/Hawaii.

However, there is, for each product, a unique price for each area beyond
Texas. It cannot be reduced to a formula that would cover the products
based on weight, or even something like a standard amount added for the
two areas beyond Texas.

Below outlines what I was doing. If anyone can help me understand the
problem with receipt.html in Minivend 4.04, or can point me to
documentation on how to do this better, I would appreciate it greatly,
as I have a gut feel that there is a more elegant way, I just cannot see
it or have found a solution looking through the archives of the mailing
list.

In Minivend 3.11, what I did was simply substitute the price based upon
a condition that looked up the item in the product database and
substituted that price on checkout and receipt and report: 

For instance:

  [if value state =~ /^TX/]
  [item-price]
  [elsif value state =~ /^HI/]

  [currency]
  [calc]
  [item-field akha]
  [/calc]
  [/currency]
  
  [/elsif]

  [elsif value state =~ /^AK/]

  [currency]
  [calc]
  [item-field akha]
  [/calc]
  [/currency]
  
  [/elsif]
  [elsif value state =~^/A-Z/]
    [currency]
  [calc]
  [item-field us]
  [/calc]
  [/currency]
  [/elsif]
  
  [else]
  [item-price]*
  [/else]
  [/if]

And variations for total of quantity of a one item extended out, and the
subtotal.

Where the price field in the database was for Texas, the akha field was
for Alaska and Hawii, and anything else was Contential US, hence us.

I put this information into the check page of Minivend 4.04, and it
worked. I put it into the receipt page of Minivend 4.04, just like I had
for 3.11, and it doesn't work.

Example: 
A001

Texas: 84 Dollars { base price }
ContUS: 95 Dollars { plus 9.00 over base price }
AK/HI: 105 Dollars { plus 21.00 over base price }

C001: 
Texas: 50 Dollars {base price}
ContUS: 59 Dollars ( plus 9.00 over base price }
AK/HI: 70 Dollars { plus 20.00 over base price }

As you can see, there is a basic pattern for ContUS, but then AK/HI has
a dollars difference. This sort of variation of a dollar or two this way
or that continues in the other 4 items.

thanks...




-- 


Jim Tom Polk -:- jtpolk@texas.net -:- http://camalott.com/~jtpolk/	
	''You might as well fall flat on your face as 
	  lean over too far backwards.''      --James Thurber--
   "The Universe is run by the complex interweaving of three 
          elements: energy, matter and enlightened self-interest." 
 		- G'Kar  "Survivors"
-
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: