Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi everybody.

I'm in the very last step for having my fisrt shop online developed with Couch Shopping Cart, but I have two troubles that I can't understand.

I've tried an alternative to the PayPal way for purchasing in th shop. By filling a form and giving the bank code for incomes.
In the checkout template the client have to fill the form, and if the form is right with <cms:if k_success />, I use the <cms:send_mail /> for sending me a confirmation mail with the purchasing info , and <cms:redirect /> that takes the client to a thanks page.

With the send_mail tag, I don't know what's the problem because a few days ago it worked perfect. But today all the k_success staff works fine but the send_mail tag.

And with the <cms:redirect /> the problem it's that the shopping cart doesn't go empty. And I use the cms:no_cache tag in the very top of the checkout template, just after <?php require_once 'editar/cms.php'; ?>. And in the thanks template I put it too.
But it only work sometimes and have a very unpredictable behaviour.

I know that it's difficult to know which is exactly the problem. But if someone can have an idea about that questions, I can give more info.

Thanks everybody.
Hi,

Taking up the second problem first -
to empty the cart you should put the tag highlighted below just before redirecting the user
..
<cms:pp_empty_cart />
<cms:redirect k_page_link />

Coming to the email problem now -
you said it was working fine till recently and then suddenly stopped working. This is a very common (and frustrating) problem but, trust me, it has nothing to do with your code (else it wouldn't have worked at all). The problem usually lies with the way mail service is configured by your hosting provider (the PHP mail() used by cms:send_mail depends on this).

Please try using for the 'from' field an email address that belongs to your server's domain itself (i.e. if the site is http://www.somesite.com, the 'from' email could be contact@somesite.com). Hosts are wary forwarding mails from external domains and usually this step rectifies the problem.

In case it still does not work, you can try using a different library altogether for sending the mails. It is a little more involved but has the greatest success rate. You can find the details here - viewtopic.php?f=8&t=8720

Hope it helps.
Thanks a lot KK.

The two tips works fine.

The <cms:pp_empty_cart /> one, and changing the from parameter in send_mail with the server mail address.

Thanks.
You are welcome :)
Glad it helped.
4 posts Page 1 of 1