extendedTplParser - how to use?

gunfighter

No avatar

2006-07-04 06:35

Sorry for what might be a stupid question. I've done some php programming, but not had to deal with classes much, so not sure how to implement this sort of thing.

I'm trying to get htmlMailOrderDetails working, and have triple checked that I installed it as per the instructions, but am not getting anything no matter what settings I use. I know that php mail is working fine on my site since I have other programs using it, and the normal QC e-mail is going out fine.

I suspect that it has something to do with the fact that it uses the Plugin Manager's 'extendTplParser' class extension. I've read the instructions, but it doesn't say much about how to implement that other than the following comment: Just "require_once (path-to-folder/extendTplParser.class.php);". I assume that I need to add this to the index.php file with the other require_once statments, and have done that, but nothing happens.

Can anyone point me in the right direction as to how to implement the 'extendTplParser' class extension?

Thanks

wizzud

No avatar

2006-07-04 09:44

If you are running the Plugin Manager as specified in the Prerequisites section of the instructions, then the extendedTplParser class is already present and you don't need to do anything.
If you set 'Report Errors' on in the plugin's configuration, what error message do you get back? And what mail configuration have got set? PHP's mail function?

gunfighter

No avatar

2006-07-04 15:41

Thanks for responding, wizzud, and thanks for the plugins.

Yes, I'm running Plugin Manager v2.0 and QuickCart 1.3 english version. When I set Report Errors I don't get any error messages showing. I've implemented the PayPal functionality from http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=1533, which is working fine. I'm assuming that the e-mail is sent out at the same point as the normal QC admin e-mail is sent out, and that is working fine. I have htmlMailOrderDetails set to send e-mails to both the Admin & Client, and have tried in HTML, text and HTML+Text. The Method is "mail", but I've also tried in "sendmail". If I set "Show Email Body and Stop" I don't get anything displaying.

I've checked again just now and have the htmlMailOrderDetails folder and all it's contents from the install package placed in the plugins folder, I have the htmlMailOrderDetails.tpl from the install package placed in the templates folder, and the htmlMailOrderDetails plugin is enabled in PluginManager (checkbox has been changed to "Yes").

The only changes I've made to my Quick Cart is the PayPal functionality listed above, plus install bandedCouriers 2.0. Is there any conflict you know of with the bandedCouriers? I see that you created that one as well, and it's working great.

Thanks for your help.

gunfighter

No avatar

2006-07-04 20:49

To follow-up to make sure I'm watching for the right thing... when does the e-mail get sent? Is it after the "Order - Delivery address" screen when you click the "send" button, like the normal QC e-mail is sent? I'm assuming if I have the "Show Email Body and Stop" option set it should stop all processing at that point and show the e-mail, and not come up with the subsequent page where the PayPal link is now displaying (and also has the option to "print your order")?

At the moment I have no indication at all that this plugin is installed (no e-mails, no messages no matter what option I select in the config screen), even though all files are where they're supposed to be and the plugin shows as active in Plugin Manager (and I've deactivated it and reactivated it a few times).

Thanks.

wizzud

No avatar

2006-07-06 03:54

Its the PayPal code - it bypasses the 'Order Saved' message on which the intercept for the email is triggered.
Try this: in plugins/htmlMailOrderDetails/actions_client.php change


if(extendedTplParser() && $oMail->isSetIntercept() === false)
  
$oMail->setInterceptID$tpl->newIntercept('messages.tpl''messages.tpl''ORDER_SAVED''ORDER_SAVED''sendHtmlMailDetails''') );


to


if(extendedTplParser() && $oMail->isSetIntercept() === false){
  
$oMail->setInterceptID$tpl->newIntercept('messages.tpl''messages.tpl''ORDER_SAVED''ORDER_SAVED''sendHtmlMailDetails''') );
  
$oMail->setInterceptID$tpl->newIntercept('messages.tpl''messages.tpl''ORDER_PAYPAL''ORDER_PAYPAL''sendHtmlMailDetails''') );
}


This adds an extra intercept so that both the non-Paypal and the Paypal orders should result in emails being constructed. That's the theory anyway!
Please be warned that this is untested!

gunfighter

No avatar

2006-07-06 04:19

You're a genious, wizzud! That's got it, thanks.

cannon

No avatar

2006-07-06 08:46

Then donate wizzud for great work! http://www.wizzud.com/component/option,com_contact/Itemid,9/task,view&/contact_id,1/

wizzud

No avatar

2006-07-06 13:38

No problem.

gunfighter

No avatar

2006-07-06 15:12

Thanks for passing that on, cannon. I have no problem paying for good support. Donation made.

cannon

No avatar

2006-07-06 19:13

Opensolution team and wizzud spend their time for free and I think they need to be credit

treewood (OpenSolution)

Avatar: treewood

2006-07-06 19:50

cannon - thanks!!!

idaryl

Avatar: idaryl

2006-11-16 07:03

[Plugin Manager v2.0 and QuickCart 1.4 english version] after reading forum http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=2530 about getting htmlMailOrderDetails working with the paypal integration - http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=3142 and noticed that even though the paypal feature worked QC did not send either the receipt, or the notice to the admin - yes, its turned on in the admin area.

Then I find this: http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=3046 about how paypal "it bypasses the 'Order Saved' message on which the intercept for the email is triggered" .... so I try it, and it kills the cart!!!

If I add this line to plugins/htmlMailOrderDetails/actions_client.php
:$oMail->setInterceptID( $tpl->newIntercept('messages.tpl', 'messages.tpl', 'ORDER_PAYPAL', 'O RDER_PAYPAL', 'sendHtmlMailDetails', '') );
}
the cart completely disappears and the page is blank - once removed back to orig the cart works again....

however, the dilemma still remains, even if I remove ALL the paypal integration, the htmlMailOrderDetails works fine as it supposed to, and with paypal integrated, yes, works as well.

So, according to Gunfighter the extendedTplParser - how to use, works, but I'm getting blanks (sorry for the pun - gunfighter)

Sorry about the dual post, but I really need some help with this, it seems to be affecting every cart I create.

idaryl

Avatar: idaryl

2006-11-19 03:35

OK so I've tried this with (4) different test areas - QC fully loaded and the same results every time! I add paypal functionality and it works, but noe email (reciept or copy to admin) as soon as i add the tplparser fix the site dies...!

Any ideas out there?

Claps

Avatar: Claps

2006-11-20 10:15

idaryl - check your code again, from your post I see that you have an extra space :

$oMail->setInterceptID( $tpl->newIntercept('messages.tpl', 'messages.tpl', 'ORDER_PAYPAL', 'O RDER_PAYPAL', 'sendHtmlMailDetails', '') );

to second ORDER_PAYPAL.

albert1

No avatar

2006-11-22 07:15

Hi wizzud

using: QC fully loaded with paypal

the code works great:


if(extendedTplParser() && $oMail->isSetIntercept() === false){
  
$oMail->setInterceptID$tpl->newIntercept('messages.tpl''messages.tpl''ORDER_SAVED''ORDER_SAVED''sendHtmlMailDetails''') );
  
$oMail->setInterceptID$tpl->newIntercept('messages.tpl''messages.tpl''ORDER_PAYPAL''ORDER_PAYPAL''sendHtmlMailDetails''') );
}



If you are addiing this code make sure every thing is wrking befor you proceed ie
777 all the files that needs to be done. test the standard admin email.

add your paypal plugin then test that is working all well and ok.

then add wizzud code. If this does not work you have missed something. :) I know .....

Albert

idaryl

Avatar: idaryl

2006-11-23 16:45

Here was the the problem:
in actions_client/orders.php

if( $aData['fCourierPrice'] >= 0 ){ //<--- here modification

without the "=" the cart dies!!

Back to top
about us | contact