Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
... use mals-ecommerce with Txp? (Can you access HTTP variables?)
I’m looking at simple ecommerce add-ons to Txp and I have come across Mals ecommerce solution (http://www.mals-e.com/), a free shopping cart add-on to any website.
To use it, all you need to do is add a form or “Buy now” link on your site which links to a separately hosted shopping cart, with a return button to your website. So far so good. Clicking the return button send the current contents of the cart as HTTP POST or GET variables back to your site. Can I access these from within Txp? Or are they lost when Txp process an incoming URL?
I think the system will still work if the variables are lost, but with them it would be possible to include current cart status info on my site, rather than just a link to the cart on Mal’s server.
Has anyone any experience of this, or can you suggest a work around?
Thanks
Steve
Last edited by springworks (2005-10-03 08:38:30)
Offline
#2 2005-10-03 07:22:14
- SuperStar
- New Member
- From: New Zealand
- Registered: 2005-09-23
- Posts: 7
Re: ... use mals-ecommerce with Txp? (Can you access HTTP variables?)
I think you mean mals-e
Offline
Re: ... use mals-ecommerce with Txp? (Can you access HTTP variables?)
Indeed I do. Thanks, original post now corrected.
In case anyone is interested (and missed my announcement of the site in the “Let’s see your then…” forum) the site in development is now live . If you visit, please remember this is a live working site and don’t checkout orders unless you really want to buy something.
If anyone is interested in knowing how I put this together, let me know.
Offline
Re: ... use mals-ecommerce with Txp? (Can you access HTTP variables?)
springworks wrote:
Clicking the return button send the current contents of the cart as HTTP POST or GET variables back to your site. Can I access these from within Txp? Or are they lost when Txp process an incoming URL?
You can access PHP from your Textpattern pages like this:
<pre>
<txp:php>
if (isset($_GET[‘animal’]) && $_GET[‘animal’]==‘Monkey’) {
echo ‘Yay, I found a monkey!!!’;
}
</txp:php>
</pre>
You can do anything from within the <txp:php>
tag that you could do in a normal PHP page…
[Lee]
Monkeys could have written a better post..
Offline