The wonderful world of PHP

While doing my eBay auctions a couple of weeks ago, I realized that since the standard template invoice e-mails that eBay sends out would print out that “…I accept the following payment methods: PayPal, See item description, Cashier’s Check/Money Order, See Item Description”. I actually accept more options which are stated in the auction. The problem is that what I accepted as payment from US residents and other countries differ. The invoice really needed to be streamline to avoid any confusion or problems. Also I provide shipping discounts for multiple wins within the same auction period. Sometimes this fact does not transfer to eBay’s invoices if auctions are uploaded with Turbo Lister it is a bit of a hassle to make sure every little checkbox remains checked throughout many different auctions and re-listings online. I really wish Turbo Lister could bulk re-list. It would be a lot better if I could get the re-listed auctions so they end around the same time and not so scattered since I have to re-list one at a time. Right now it’s the only free option there is that I know of.

I’ll just have to change the wording in my auctions so that people who decided to bid on multiple auctions of mine and win them must wait for an invoice. The majority of people these days are real good at paying. One person a while ago paid within minutes of the auction close. Didn’t even get the chance the send an invoice.

Anyway, I decided to come up with my own e-mail invoice form for times when the standard invoice would not be feasible. It’s PHP style. I took the standard wording from the invoice sent and used that template to create my own. Sure a e-mail template can be used but I wanted a template that also does the adding of costs for me. Plus, it is a chance to really dive head first into PHP hacking.

To prevent wasted time online and hogging up the phone line trying to test out my coding, I use XAMPP server by Apache Friends. There are 2 versions: lite and full. The full version comes with the following along with other items depending on whether you use Linux, Windows or Solaris SPARC:

Great for testing out some of your server side scripting or testing out server side software before releasing it live. I even tested out WordPress offline before I tried it out on my DreamHost space.

Everything’s working fine but, I know there is a more efficient way to loop through the section of each “Item #”, “Item Title”, “Qty” and “Price” and create if, else Array statements to clean up some extra line breaks if a person only wins, say, one auction only. Right now there’s “item0” through “item6” for each possible item they win. Each item on it’s own line.

Yesterday I even created a form that creates a “Payment Acknowledgement” page that fills out the bidders ID and total paid.

My “To Do” list for future revisions:

  • Create code that combines the “Invoice” and “Payment” forms on one central .php template page. A set of radio buttons will determine which filled out page is the final output.
  • Create code that will have the resulting page previewed and create a button script that will automatically e-mail the page to the bidder; instead of my currently having to select all the resulting text and paste it into an blank e-mail.