Changeset 1139

Show
Ignore:
Timestamp:
09/24/06 18:52:51 (2 years ago)
Author:
jm3
Message:

confirmation / thanks page now working

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • peasantonline/app/controllers/catalog_controller.rb

    r1133 r1139  
    158158                              ) 
    159159             
     160                # FIXME: this should all be done on thanks, and the cart not cleared here, but this was more foolproof at the moment... 
     161                # we should also show the cc number in XXXX XXXX XXXX 1234 format here 
     162                redirect_to_thanks( 
     163                  "Card processed successfully: #{@transaction.authorization}<p />" + " <b>Order details</b>:<br /> #{@order.first_name} #{@order.last_name}<p />" + " #{@order.address}<br />" + " #{@order.address_2}<br />" + " #{@order.city}, " + " #{@order.state}<br />" + " #{@order.zip}, " + "#{@order.country}<br />" + " #{@order.phone}<br />" + " #{@order.email}<p />" + " Comments: #{@order.comments}<p />" + " Sub-total: $#{@cart.total_price}<br />" + " Sales Tax: $#{@order.sales_tax}<br />" + " Shipping: &nbsp;$#{@order.shipping}<br />" + "------------------<br />" + " Total: &nbsp; &nbsp; $" + (@cart.total_price + @order.sales_tax + @order.shipping).to_s) 
     164 
    160165              begin 
    161166                @transaction.submit 
     
    179184        end  
    180185 
    181         def thanks(msg = nil)  
     186        def redirect_to_thanks(msg = nil)  
    182187                flash[:notice] = msg if msg  
    183188                redirect_to :action => :thanks  
  • peasantonline/app/views/catalog/thanks.rhtml

    r1136 r1139  
    11<h1>Thanks very much for your order.</h1> 
    2  
    3 <h2>Confirmation details:</h2>