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

5.2.3 Invoices

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-17-2015, 07:39 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default 5.2.3 Invoices

We are well on with building our replacement store in 5.2.3 but, are sticking rigorously to only making changes via "webmaster mode" so that ( in theory anyway.....) they are exempt from any future upgrade incompatibility a la most 4.** series releases and the recent experience we had with 5.1.1 to 5.2.2

First item is the sales invoice 'standard' output. We worked out how to get rid of the 1980 style commas () in all the different address sections, but a glitch we have noticed, is that the "Country" field output is in the wrong place in the customer address blocks. It's half way through the address!

It's 100% correct on the customer input form and in the resultant address book entry and also on our provider's section of the invoice etc etc.

Via Webmaster Mode, the specific section of the 'shipping address' theme tweaker tpl looks like this:

<strong class=“title">{t(#Shipping address#)}</strong>

<ul class=“address-section shipping-address-section">
<li FOREACH=“getAddressSectionData(saddress),idx,field " class="{field.css_class} address-field">
<span class=“address-title">{t(field.title)}:</span>
<span class=“address-field">{field.value}</span>
<!-- <span class="address-comma">,</span> -->
</li>
</ul>

How do we work out from here, where the address block field order is and then correct this, whilst still in webmaster mode? It's very easy to find this in the provider's address (head.address.tpl) but we can't see it here

Second item is the spawn of the devil himself; the ever present " _ _ _ " small marks at the end of all invoices, many emails and a few other items from X-cart... (pic)

What is their purpose and why? More importantly, how do we hide them whilst still in webmaster mode? One example of the frustration they cause is that if a customer (or we ourselves) wish to print any 'affected items', these unnecessary additions (we think) result in an extra blank page that has zero value to anybody...

The invoice production is now vastly improved over our 4.1.9 experience, but we just need to "finish" this bit of the job!
Attached Images
 
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #2  
Old 04-19-2015, 04:16 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: 5.2.3 Invoices

For some reason I cannot click on or see the attachment...
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 04-20-2015, 01:32 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: 5.2.3 Invoices

Quote:
Originally Posted by totaltec
For some reason I cannot click on or see the attachment...

Hahaha! Mike, you more than anybody, know what these are (plus they are shown in the text of our message) so, we are guessing that you're just teasing us and it's not a ...Monica, Bill and THAT dress..." style, mis-directional message?

Seriously though, any tips on the questions? Maybe you know exactly where to look?
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #4  
Old 04-20-2015, 02:21 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: 5.2.3 Invoices

No, I was not teasing, I see that there is an attachment, but it is blank and I cannot click on it.

To answer your first question, I can't see how this is possible in a template. Changing the order of an array, needs to be done in PHP not Flexy. I've never seen the small marks before.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #5  
Old 04-20-2015, 02:45 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: 5.2.3 Invoices

Quote:
Originally Posted by totaltec
To answer your first question, I can't see how this is possible in a template. Changing the order of an array, needs to be done in PHP not Flexy

Hmmmm Not what we were hoping for The thing that's really confusing us, is that we can see the equivalent individual address fields within the providers address block area (as stated in our message i.e. within head.address.tpl). We haven't altered these, as there is no need, they are all in the correct order by default! I guess we can backup / try altering a couple of these as an experiment, then delete the Theme Tweaker addition once done? However, if this works, that just makes this more frustrating in terms of "where are they and why can't we correct them?" We'll try what we have just suggested and post back the results

Quote:
Originally Posted by totaltec
I've never seen the small marks before.

Now this is amazing. They are on everything! We are totally 100% OSX / IOS / UNIX based. We are guessing you may not be? It's not an Operating System incompatibility glitch is it?

Quote:
Originally Posted by totaltec
No, I was not teasing, I see that there is an attachment, but it is blank and I cannot click on it

Hahaha Okay no problem. Are you saying that you can't just right click and "view image"? We can do that on any device, even when not logged in the forum and see a simple screen print of the small marks from an X-Cart e-mail...
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #6  
Old 04-20-2015, 06:16 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: 5.2.3 Invoices

Quote:
Originally Posted by Triple A Racing
We'll try what we have just suggested and post back the results

Yep, as we thought it might be. Easy to find, easy to alter easy etc. Just what you want and expect really. NB The detail below is for the Providers address block (pic for location).

What we are looking for, is exactly the same access / mod for the Customer's address(es) block(s) - See first message for details. Remember this is only because it is wrong as provided... Not for any other reason!

Where does this stand against your thoughts before Mike? It seems bizarre that you can alter one block, but not the others. One is a constant value and the others are variable (in terms of data content) if we are being fair. This may dictate how this data is stored / accessed etc of course?


Here is the extract from the unaltered file:

Quote:

<td class="address"> <strong>{config.Company.company_name}</strong>
<p>
{if:config.Company.location_address}{config.Compan y.location_address}<br />{end:}
{if:config.Company.location_city}{config.Company.l ocation_city} {end:}
{if:config.Company.locationState.state}{config.Com pany.locationState.state} {end:}
{if:config.Company.location_zipcode}{config.Compan y.location_zipcode}{end:}<br /> {if:config.Company.locationCountry}{config.Company .locationCountry.getCountry()}{end:}
</p>
<p IF="config.Company.company_phone|config.Company.co mpany_fax"> {if:config.Company.company_phone}{t(#Phone#)}: {config.Company.company_phone}<br />{end:} {if:config.Company.company_fax}{t(#Fax#)}: {config.Company.company_fax}{end:}
</p>
<p IF="config.Company.company_website" class="url"> <a href="{config.Company.company_website}">{config.Co mpany.company_website}</a>
</p>
</td>
Attached Thumbnails
Click image for larger version

Name:	Location.png
Views:	187
Size:	173.0 KB
ID:	4109  
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #7  
Old 05-10-2015, 01:49 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: 5.2.3 Invoices (Now 5.2.4...)

Initially, this post was about the failure of the customer address data to be consistent (in terms of display order) between the address book / entry screen and the system produced invoice. The issue that we saw was that the customer's address content MUST be consistent across ALL areas of the store (and via communications e.g. e-mail etc) unless you manually choose to alter this display / appearance / running order etc. This is surely a BASIC requirement of any software!

The "annoying marks" were an additional observation, but less important. No answers were posted on here for either (apart from your assumption of the challenge Mike, about changing the order of an array, which turns out to be correct) so we posted a ticket to the X-Cart Support Team. Here's the answers:

It appears that the address consistency failure is a core issue So we'll need to wait until 5.2.5 for a fix as we understand this now. It is such a basic simple item and worked perfectly 20 years ago on our Window's 95 and ancient Desktop PC's! Not ideal for this to be a bug in new software releases then!

The "annoying marks" as we called them or the "Line" as it's referred to within X-Cart were implemented to "separate" the body of email from any e-mail signature. In our Linux / OS X / IOS only world, that's just bizarre but to be fair, everyone is different and uses different set-ups so at least we can see why they are (well were) there... We followed these instructions and removed them completely from our setup:

"The "---" is coded in the ./skins/mail/en/common/signature.tpl file. So, you can remove the line from the file, save it and the re-deploy the store." We did, it works, so that's fixed now.
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #8  
Old 05-10-2015, 06:49 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: 5.2.3 Invoices (Now 5.2.4...)

Thanks for sharing this information.

Quote:
Originally Posted by Triple A Racing
"The "---" is coded in the ./skins/mail/en/common/signature.tpl file. So, you can remove the line from the file, save it and the re-deploy the store." We did, it works, so that's fixed now.
Am I reading that you edited the core file above? What happened to only making changes via Webmaster mode?

Editing core files is never recommended, in fact it is quite insistently warned against.

Triple A, I know you have chosen this course, but I have to say this in case anyone else reading this thread is confused about the right way to modify XC5.

The "correct" way to edit X-Cart 5 is via the creation of your own custom module. Creating a custom module is useful on so many levels. One module can contain all of your skin changes, all of your JS and CSS, as well as all of your custom code and database changes. With a simple click of a button, you can pack your module, essentially sucking out all of your myriad and diverse changes that exist in dozens of different folders all over the file structure.

No more hunting, "Where did I make that change?", No more wondering, "What's different between my copy of the software, and the original?". Everything is in one, manageable, organized place. Now you can pack up the module and transport it to any other X-Cart installation, and with a simple upload see everything that makes your site yours in this fresh install. You can also deactivate every piece of your custom code, skin templates, CSS, JS by simply disabling one module. Writing your own module (or having it written for you) allows you to edit absolutely everything about the way XC5 works, without ever altering one line of the core code or the official modules code, both the PHP files and the Skin templates.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #9  
Old 05-10-2015, 07:22 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: 5.2.3 Invoices (Now 5.2.4...)

Quote:
Originally Posted by totaltec
Am I reading that you edited the core file above? What happened to only making changes via Webmaster mode.

Hahahaha Don't give birth in shock Mike, apply a little perspective here....

Yes, we only want to make changes via Webmaster mode (and have stuck to that, with this exception so far). Webmaster mode is easy (especially if you used it in 4* X-Cart previously), it works and there is NO NEED to create custom modules if you choose this option. If you recall creating a custom module resulted in a trashed upgrade from 5.1.11 to 5.2.2 for us originally... For our project, we'll avoid custom modules unless there is absolutely no other option. The only issue is when you find items that you can't access via Webmaster mode and this one ( ./skins/mail/en/common/signature.tpl file ) is an example of that. Hence the helpful, informative reply in the ticket from the X-Cart Support, which made that clear and instantly understandable.

This particular change (i.e. commenting out the 'Line') is very easy to document, record, back up (before and after) and when the next upgrade comes, yes we'll have to do it again as it will get overwritten. That's a drag, however it only takes about 50 secs once you understand it and are working from your own accurate, detailed records. We would much rather go through a simple process like that, than the dreaded #faileddeployment possibility... Also, this is a user preference and NOT a bug or fault so many people won't alter it. Even X-Cart themselves leave it in

Meanwhile, the more serious address continuity bug (it really should have been picked up before it was released) together with quite a few others that we have picked up in 5.2.4, are Core faults, so we haven't touched them at all.

We're simply waiting for the 5.2.5 epiphany - due very soon we hope!
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote
  #10  
Old 05-11-2015, 03:31 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: 5.2.3 Invoices (Now 5.2.4...)

Quote:
Originally Posted by Triple A Racing
Hahahaha Don't give birth in shock Mike, apply a little perspective here...
I won't. Glad you have everything figured out.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
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 08:39 PM.

   

 
X-Cart forums © 2001-2020