News:

Looking for documentation? Take a look on our wiki

Main Menu

Payment on Account or Cash On Delivery

Started by ChocoStudio, August 15, 2012, 19:37:00 PM

Previous topic - Next topic

ChocoStudio

Hi, I'm wondering if anyone can point me in the right direction.

PAYMENT on ACCOUNT

I'm updating a site from VirtueMart 1 to 2. I'm trying to work out how to make a module for customers to pay on account.
The client is a sandwich shop and has many corporate clients who register.
There is an account number field on the SQL databases, but may be this is not needed now

Anyway, I really don't know how one could store the information and work out what is billed and what is not.
Do I need to create a new VM Payment method or is VM Payment, standard ok for this - then just use the pending category?

CASH ON DELIVERY

Also I need to make a COD option - I'm really stuck - and have no idea where to look!

Even if it's just pointing me to modules, relevant documentation, or roughly what steps I would need to take, I would be grateful for the help; I've looked on the net for how to do this, but I'm just not sure that I understand the cart at all.

I would also like to change the order.done.php file to provide more of a confirmation - ie order summary, and delivery date etc.... I could change the information directly in order.done.php but it seems to refer to elsewhere, with a JText::_'COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU' but I can't find where that information is kept. I thought that it was in .ini files but I can't find them. Any clues anyone?


DELIVERY DATE and TIME


How could I add a delivery date and time option for orders please?

stewart9643

Hi
I'm also interested in a similar scenario for a client. I don't usually play with virtuemart so any advice would be appreciated.

Thanks

alatak

Hello,
You can use the standard payment, and add the information you want to display for the client in the 'Payment Info'

matthe3b

OK, so I've got a bit further with this. I've generated the HTML code for the delivery date and time form separately so that I can refer to it later, or use it as a template for constructing the form via php.

I can see that the helps/cart.php file seems to get the session data and put it into the cart. But the delivery date and time would only be put in at the cart time. However there is a field for customer comments in this file too, which is slightly curious to me, as it refers to automaticSelectedshipment, which to me implies the shipment that is selected on the cart's first creation. OK, so may be not that file. But I assume that I would have to somehow register the variables there perhaps, or not?

Could I just post to the relevant order data column in the SQL field and how could I ensure that I post to the correct order?
If so it would seem that the best place to put this is in the select_shipment.php file. This seems like a hack to me, but I'm running out of time. So clearly something similar to the select shipment rates could be created.

However I don't seem to be able to work out how to select the relevant order_id - as VMart is OOP now so everything is cleverly distributed in a class. I've looked in order.php and other places, but really can't work out VirtueMart's logic. There seems to be a lot of views, so it doesn't seem to adhere to the fat models skinny controllers aspect or are the views just that?

What's my next step please?

What is my