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.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Concrete5 --> SilverStripe || MODX?

Go to End

13 Posts   9226 Views


Community Member, 136 Posts

6 March 2012 at 1:50am

Hi Chris,

I'm just installing the FoxyCart module and I have a few questions - like where do I enter the API key? Is there any kind of documentation you could point me towards, or could you outline the initial set-up steps? Thanks, Neil


Community Member, 35 Posts

7 March 2012 at 6:44pm

Hey Neil,
sorry, i am lacking in documentation, but feel free to ask whatever you need here.
once you set the store name, i believe it should work well.
you would set the params in mysite/_config.php.

// set your store name ( would = myStoreName).

// set the API Key
// foxycart would then send the datafeed to

you can decorate FoxyCartDataFeedCollector to do whatever you want with the data. here's an example of how you could send the information out to another service for something like order fulfillment:

//in mysite/_config.php:
Object::add_extension('FoxyCartDataFeedCollector', 'Dispatcher');

// in Dispatcher.php
class Dispatcher extends DataObjectDecorator {
	static $url;
	public function setURL($u){
		self::$url = $u;
	public function DispatchData($data){
			$ch = curl_init();
			curl_setopt($ch, CURLOPT_URL, self::$url);
			curl_setopt($ch, CURLOPT_POST, 1);
			curl_setopt($ch, CURLOPT_POSTFIELDS, array("FoxyData" => urlencode($data)));
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);
			return $response;
		return 'no data';
    public function handleDecryptedFeed($encrypted, $decrypted){
    	//do what you want to with encrypted & decrypted data

i hope it helps, please let me know how it goes, and if you have any recommendations.


Community Member, 136 Posts

7 March 2012 at 10:53pm

Thanks Chris.
When I set the API key in FoxyCart do I need to set the "customer password hash type" and if so, which setting is right?
And should "enable cart validation" be ticked or unticked?

Also, and I don't think this has anything to do with settings for your module so feel free to ignore this question, but do you have any idea why Foxycart would give me a warning about my CSS file when I cache my template URL for Cart/Checkout when my CSS file is only referencing cached images like so:

background-image: url(;

But the warning still says "A reference to a non secure css file was found"



Community Member, 95 Posts

8 March 2012 at 9:40am

you dont need to turn on customer password hash type. its mainly for sharing users. i never had to do that so i havent built a connector, but its nice that its possible. the module doesnt support cart validation right now either. its an anti-spoofing method to prevent people from changing prices in firebug before buying stuff, and i've never had anyone thats done that.

for the warning, its saying your'e trying to pull an image from http in an https environment, and the background image is looking for (non https).

ive never had to point to the foxycart cache in my css though, foxycart has always seemed to crawl relative urls, rewrite the links and import the images to their own environment.. so for example, in my css, i would write:

background-image: url(../images/topbar.gif);

foxycart then finds the images and pulls them into their environment, pulls the html into their environment and rewrites the links.



Community Member, 136 Posts

8 March 2012 at 11:06pm

Makes sense, thanks Chris - great work!

Go to Top