Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Interspire Connector


Reply


2 Posts   1217 Views

Avatar
tazzydemon

Community Member, 124 Posts

1 February 2010 at 5:52pm

Edited: 01/02/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.

         if(Director::isDev()) $myextender->write();

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.

Avatar
tazzydemon

Community Member, 124 Posts

3 February 2010 at 10:09am

Sorry that was posted to the wrong group. Will repost to beta...