The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Testing hidden/custom fields XML feed

RickWRickW Member
in Help edited October 2009
Is there a way to test a hidden custom field without going live?

If written into my post to cart

echo"<input type='hidden' name='h:login' value=$_SESSION/>";

and this line to parse the xml feed

$email = $custom->login;

I've got everything else working great but I'm reluctant to go live just to test.




The parse code works using test.xmldatafeed.php when I set

<custom_fields>
<custom_field>
<login>customer@abc.net</login>
</custom_field>
</custom_fields>

So, Is there a way to test a hidden custom field without going live?
Comments
  • Hi Rick.

    You should be able to place test orders (that produce almost real results, including triggering the datafeed) by using a test gateway. I personally prefer using to CDG/Quantum to test, using the default test account (in the foxycart portal, under STORE->payment). Documentation on how to trigger different results (including success) can be found here: https://secure.quantumgateway.com/test_data.php ...then checkout as a customer.

    Is that what you were asking?
  • My store is live, and I am working on a new product that requires the xml feed. I'm set up with CDG but I really don't want to go into test mode unless I have too.

    I guess I can set the price very low and test it live. Looking at what I posted above, do you see anything basically wrong?
  • Ahh, sorry....misunderstood the live/test issue you were dealing with. Yes, it _looks_ like it should work.

    If you do much testing like this, and don't mind managing it, I've found it invaluable to have a second (free, test only) foxycart account setup -- along with a secondary testing copy of any code like the datafeed script, and a testing database -- so you can test and revise your changes as much as you want before copying the changes over to live code. This does of course make changes a bit more time consuming...and you can go much, much further into dev/QA complexity...but well, just an idea. :)
  • Not a bad idea, I have a test server that I use on other projects. I should have used it here but I "jumped the gun".
  • brettbrett FoxyCart Team
    RickW, I might be missing the problem (probably am), but in FoxyCart, just flip the gateway settings to test and use the default test account data. Run a quick test. That way you don't bother your live account.

    Does that make sense? Or is the issue that the test-generated XML would send data to your live store?

    Like tookings said, you can set up another FoxyCart account if you want, but we'd _strongly_ recommend testing as much as possible, especially if you're going to use custom integrations and the XML. Just so much that can go wrong; testing can save tons of time and money.
  • Maybe that's the best solution. A quick test from live to test and then back again. I tried running a live test, and voided the charge and it cost me .60. No big deal if you have it right the first time. Thanks for your help.
Sign In or Register to comment.