Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

So... I have hacked and modified my site a heap now. But I've never had to write anything from scratch - I've used some of the many wonderful contributions from the community. And now I'm after a suggestion of a contribution, or just some help with code...

 

My situation: I'm trying to create a printable receipt for the admin side, that lists the CC number (with the XX's in the middle), the expiry date, and the amount charged.

 

The expiry date and CC number are simple enough, they are stored in the database. The amount charged is a bit more complex: I don't want it to simply be the order total - too often the postage etc is different to what oscommerce chooses, so I want my staff to be able to enter a number, just before printing the receipt. Ultimately I am trying to add a field to the bottom of orders.php that is autopopulated with the order total, but can easily over-ridden and saved to the database. I've created the extra field in the orders table, but that's about as far as I've gotten.

 

So - can anyone point me in the right direction. I really don't know the code enough to do the writing, only to hack something I've already got, and I can't find any contributions/already existing code that does something similar.

 

Thanks for any suggestions :)

Posted

Ok... so I have managed to hack the edit_orders contrib... But have one more problem.

 

When an order is completed, and the information is written to the database - when is the order total (ot_total) written to the table. When it is being written to the table, I want it to also be written to my new field in the ORDERS table, 'amount_charged'.

 

So... can anyone point out when exactly (what file?) does this information get written to the database? Thanks for any pointers :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...