Akopia Akopia Services

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

[mv] [mv4.04] Could a discounting problem be caused by a domain switch?



******    message to minivend-users from Mark Stosberg <mark@summersault.com>     ******


Hello fellow Minivenders and Interchangers,

  I'm debugging a client's mv4.04 store that provides discounts of
orders of 10 or more items. When this discount is applied, there are
intermittent errors with it working. Example:

An order for 80 items shows the correct discount and price in the
shopping cart and checkout. On the final page, it gives an error that
the transaction did not complete, but the transaction _did_ complete--
the customer was sent a receipt with _no_ discount, and the transaction
went through to Authorize.net with no discount. 

I have theories about two aspects that could be related. First, my code
could be off. This is what I have on the checkout.html and final.html
(modifications of the simple demo):

[calc] 
      [item-list]
          $totalq += [item-quantity];
      [/item-list]
          return '';
[/calc]

[discount ALL_ITEMS] 
	if ($totalq >= 10) {
		return ($s * .45); 
	} else {
		return ($s * .65); 
	}	
[/discount]

[perl]
	if ($totalq >= 10) {
		$Scratch->{percent_discount} = 55;
	} else {
		$Scratch->{percent_discount} = 35;
	}	
	return
[/perl]

------------------------
The $Scratch->{percent_discount} is simply used to show the user what
discount they are getting-- it shouldn't be related to the actual
discount. 

Secondly, the checkout occurs on another server, switching from
client.com to 
isp.com/~client/   This appears to be causing other problems, and I am
encouraging the client to purchase a secure cert for their domain. :) 

Thanks you all!

    -mark

PS: for you perl and postgres users out there, here's my own
contribution to open source software, a free web-based system to
maintain a yahoo-like directory of resources: 
   Cascade
   http://summersault.com/software/cascade/
-
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: