Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

XC5 anomolies - invoice contents, duplicate messages etc.

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 12-22-2014, 05:13 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default XC5 anomolies - invoice contents, duplicate messages etc.

I am in the process of finalizing our transition from XC4 to XC5. I have noticed a number of issues.

We first wanted to change the layout of the online invoice. when we used the following code in our module:

PHP Code:
\XLite\Core\Layout::getInstance()->removeTemplateFromList('order/invoice/parts/head.logo.tpl''invoice.head');
\
XLite\Core\Layout::getInstance()->removeTemplateFromList('order/invoice/parts/head.address.tpl''invoice.head'); 
it removed the default logo and address and we could add our own in our skin/module folder. However it also removed the corresponding fields from the emailed invoice. We could not find any way to add that back to the invoice as overwriting email fields/parts does not seem to be documented - we had to create a new file and place it in /mail/en/order/invoice/parts with a new section header i.e. invoice.ourhead.

Secondly we are using stripe and every test order produces two 'your order has changed' messages but no order notification irrespective of the settings on the notification sections of contact information page. I would think that changes would only occur if changes are made after the order was received.

Is there a way to overwrite email items with a custom module and is there a way to figure out why no order notification is received, only two changed notices?
__________________
X-Cart: 5.2.6
Reply With Quote
  #2  
Old 12-24-2014, 06:26 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

Hi!

Thanks for questions!

1) In case you need to remove these sections from mail notifications only, please use this construction:

PHP Code:
\XLite\Core\Layout::getInstance()->removeTemplateFromList('order/invoice/parts/head.logo.tpl''invoice.head''mail'); 

As you can see, we have added third parameter as 'mail' and it means that template is removed from view list of mail interface only.

2) As for order notifications, are you sure you are using latest version of X-Cart 5? There were bugs related to order is changed notifications, but they have been fixed in 5.1.7-5.1.9.

So, I would recommend updating to latest version in order to rectify this problem.


Quote:
Originally Posted by gkarlsson
I am in the process of finalizing our transition from XC4 to XC5. I have noticed a number of issues.

We first wanted to change the layout of the online invoice. when we used the following code in our module:

PHP Code:
\XLite\Core\Layout::getInstance()->removeTemplateFromList('order/invoice/parts/head.logo.tpl''invoice.head');
\
XLite\Core\Layout::getInstance()->removeTemplateFromList('order/invoice/parts/head.address.tpl''invoice.head'); 
it removed the default logo and address and we could add our own in our skin/module folder. However it also removed the corresponding fields from the emailed invoice. We could not find any way to add that back to the invoice as overwriting email fields/parts does not seem to be documented - we had to create a new file and place it in /mail/en/order/invoice/parts with a new section header i.e. invoice.ourhead.

Secondly we are using stripe and every test order produces two 'your order has changed' messages but no order notification irrespective of the settings on the notification sections of contact information page. I would think that changes would only occur if changes are made after the order was received.

Is there a way to overwrite email items with a custom module and is there a way to figure out why no order notification is received, only two changed notices?
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 12-24-2014, 06:31 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

Thanks Tony,

I am using the latest version 5.1.9.
The reason I wanted to change the header was that I wanted the logo on the left and the address on the right.
There was also an issue in the billing and shipping address where the tpl forced the width to 80% (or 90 cannot remember) and I had to change that to 50% else the formatting was totally off.
Is there a location where one can place tpl files for mail messages instead of having to put them in the /mail/en/... folder?
__________________
X-Cart: 5.2.6
Reply With Quote
  #4  
Old 12-24-2014, 06:50 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

Thanks for the update
1) Regarding Stripe. First of all, are your Stripe order being switched to Processed status automatically or they still sit in Processed status.

In order to get rid of Order is changed messages, please apply the fix mentioned here:
http://forum.x-cart.com/showpost.php?p=376451&postcount=8

2) Regarding mail templates, why do you want to put templates anywhere else rather than into skins/mail/en folder? What is wrong/inconvenient about placing mail templates into skins/mail/en folder?
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #5  
Old 12-24-2014, 07:49 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

I will have to check the stripe settings - We authorize only and capture when we ship.

As for the location - I wanted to keep it consistent with the regular skin location under default/en/modules/company/modulename/mail/en/...

We have created our own modules for shipping markups, extended fields in product and translation table in database, etc.

I don't want to insert files all over the place. it makes it difficult to keep track of, especially when there are xcart updates and stuff no longer works like it used to.
__________________
X-Cart: 5.2.6
Reply With Quote
  #6  
Old 12-24-2014, 12:55 PM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

I see. If you add new templates to skins/mail/en, I assume that you put them into skins/mail/en/modules/YourId/YourModule/ folder.

If you do it this way and then pack the module, these templates will be packed as well. Does it solve the problem for you?
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #7  
Old 12-24-2014, 01:00 PM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

Did not know you could do it under /skin/mail/en/modules will give that a spin. Thanks for heads up.
__________________
X-Cart: 5.2.6
Reply With Quote
  #8  
Old 12-29-2014, 10:07 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

I finally managed to get all my changes into the modules under mail and they all work as expected.

However I was still getting duplicate 'changed' messages so I applied your module that you listed above (that disables changed messages). However I now get no Order Notification messages at sales or the customer email address. I have them enabled under 'Store Setup -> Contact Information'.

I would expect an order confirmation message to be sent at the same time that the order shows up on the screen. Is this a bug or am I overlooking something blatantly obvious?

Please note that I am using stripe and it is set to only authorize the payment - Florida Law requires that we charge/capture only when we ship.

I just tested Payment Method Purchase Order then I get an order confirmation. I would think that Paypal might also work but I can't test that as it points back to our live server.
__________________
X-Cart: 5.2.6
Reply With Quote
  #9  
Old 12-30-2014, 06:16 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

Yes, this is correct behaviour. If you are using an on-line payment method, you will not receive an initial order notification even if corresponding options are enabled under 'Store Setup -> Contact Information'. That is because online payment method almost instantly can tell whether the payment is accepted or not.

That is why these options only work for offline payment methods like Purchase Order.

X-Cart 5.2 will have a detailed settings page for order notifications though.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #10  
Old 12-30-2014, 07:57 AM
 
gkarlsson gkarlsson is offline
 

Member
  
Join Date: Apr 2014
Posts: 24
 

Default Re: XC5 anomolies - invoice contents, duplicate messages etc.

Quote:
Originally Posted by tony_sologubov
Yes, this is correct behaviour. If you are using an on-line payment method, you will not receive an initial order notification even if corresponding options are enabled under 'Store Setup -> Contact Information'. That is because online payment method almost instantly can tell whether the payment is accepted or not.

That is why these options only work for offline payment methods like Purchase Order.

I understand that you say this is the 'correct behavior' but correct according to who?
Almost every web site I purchase from does an authorization when placing an order and I get an email notification that the order was received. When the order is shipped I get a shipping notification and the payment is captured.
How can I get the customer an 'order received' notification similar to your offline processing? This is the correct behavior according to most web sites.
When you authorize a payment then that amount is reserved against the customers credit/debit card and you have about 30 days to capture. So your statement implies that until you actually capture the payment there is no order?

Quote:
Originally Posted by tony_sologubov
X-Cart 5.2 will have a detailed settings page for order notifications though.

I have been working on getting XC5 up since I purchased it just after it was released, When you released fly-out menus I finally had sufficient functionality in XC5 to be able to migrate. I don't have the luxury for waiting another month or two for new features that might or might not enable what I need.


Is there a hook, that I can use, to enable sending email notifications on credit card capture? I really don't want to have to browse through more code than I need to.
__________________
X-Cart: 5.2.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:24 AM.

   

 
X-Cart forums © 2001-2020