1999 Posts in 531 Topics by 434 members
|Go to End|
1 February 2010 at 5:52pm Last edited: 1 February 2010 5:56pm
This a a first bash at an Interspire Emailmarketer connector to the OrderForm Page
Sadly, I had to modilfy the OrderForm.php class to get the connection to my new classes. I guess I could simply have replaced the class but then I would have to keep reflecting new base code changes. I could also have experimented with decorators but I had no idea what I am doing in this case.
This package has a class that extends DataObject so that I can record what has happened for testing purposes. Thus it does not extend OrderForm so as a result I have to pass the form data as an argument to the main function processExtender(). I have tried to make the modifications to OrderForm.php as generic as possible. There are two areas:
1. Add a form element to let the user decide whether ot not to opt in to whatever you choose (see _config.php).
2. In processOrder() actually do the send to Interspire.
There is a report module included to facilitate checking of what's happened and provide the Interspire response. Note that there is no response ither than SUCCESS if the email already exists in the Interspire database.
Ultimately that and the $myextender.write() could be removed or perhaps tied to whether it is dev mode to not. ie.
so the database is not kludged up with a lot of worthless test rubbish.
This is my first attempt at all this so sorry if its garbage! I must learn more OO php. The decorators are the most confusing.
My next will be an autocolumnising YAML template of a type I have used a lot with ModX and Interspire stores (see http://www.yaml.de. Dont confuse this with the markup YAML.
3 February 2010 at 10:09am
Sorry that was posted to the wrong group. Will repost to beta...
|Go to Top|