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

X-Cart 5.2.14: code changes that you should be aware of
 
Reply
   X-Cart forums > News and Announcements
 
Thread Tools
  #1  
Old 05-13-2016, 04:01 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default X-Cart 5.2.14: code changes that you should be aware of

Hi!

In X-Cart 5.2.14 the directory structure and the logic for the "top categories" widget has changed a lot.

If you have a module or a skin that replaces any of the files under the "/src/skins/default/en/categories/" directory, you will likely get a "fatal error" on pages displaying the widget after upgrading to 5.2.14.

What is changed:
1. The template directory structure is different. It may be that now you should replace a different template.
2. In earlier XC5 versions the widget retrieved a collection of \XLite\Model\Category objects. Now, for performance reasons, the widget works with a raw array of information about categories. The array may not contain some fields that you use in your custom module/skin. If so, you should look into \XLite\Model\Repo\Category::getCategoriesAsDTOQuer yBuilder() and \XLite\View\TopCategories::collectCategories() methods and adjust them to get the information you need.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
cflsystems (05-13-2016)
  #2  
Old 05-15-2016, 07:50 PM
 
ou812 ou812 is offline
 

Newbie
  
Join Date: Oct 2014
Posts: 3
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

so how can I fix this... it happened to me for categories and unsure how to fix

https://www.pomeroyandcompany.com/robot-vacuum-cleaner-battery-parts-accessories/irobot-battery-parts-acce...t-battery-pack

gives error:

ERROR: "Includes\ErrorHandler::FATAL_ERROR" (code 2)
Call to a member function display() on a non-object
Reply With Quote
  #3  
Old 05-16-2016, 08:41 AM
 
ou812 ou812 is offline
 

Newbie
  
Join Date: Oct 2014
Posts: 3
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

if there is more than one product.. category doesn't work or display correctly and gives that error code...

can you help?
Reply With Quote
  #4  
Old 05-16-2016, 04:09 PM
 
paulmighty paulmighty is offline
 

Member
  
Join Date: Apr 2014
Posts: 11
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

I'm noticing errors after the upgrade from 5.2.13 to 5.2.14 when deploying a store that includes Bootstrap glyphicons-halflings font-face.

The file is:
Code:
skins/common/bootstrap/css/variables.less

line 6:
Code:
@{common-skin}: false;

line 78:
Code:
@icon-font-path: "@{common-skin}/bootstrap/fonts/";

In the deployed CSS file, this renders with a directory title "false" in the path like so:
Code:
@font-face { font-family: 'Glyphicons Halflings'; src: url("false/bootstrap/fonts/glyphicons-halflings-regular.eot"); src: url("false/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix") format('embedded-opentype'), url("false/bootstrap/fonts/glyphicons-halflings-regular.woff") format('woff'), url("false/bootstrap/fonts/glyphicons-halflings-regular.ttf") format('truetype'), url("false/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format('svg') }

Did not have this issue in 5.2.13 and am wondering what is the best way to fix this? Can I add something to my custom theme other than just overwriting the @font-face include?

Thanks!
-Paul
__________________
X-Cart Version: 5.2
Reply With Quote
  #5  
Old 05-18-2016, 12:40 PM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

Please try the 5.2.15 upgrade that has been released a few hours ago.
I've tried it on my local computer and it seems that the glyphicons URLs are correct in 5.2.15.
__________________
Slava Petrov,
X-Cart team

LinkedIn
Facebook
Twitter
Reply With Quote
  #6  
Old 05-18-2016, 01:30 PM
 
paulmighty paulmighty is offline
 

Member
  
Join Date: Apr 2014
Posts: 11
 

Thumbs up Re: X-Cart 5.2.14: code changes that you should be aware of

Quote:
Originally Posted by xplorer
Please try the 5.2.15 upgrade that has been released a few hours ago.
I've tried it on my local computer and it seems that the glyphicons URLs are correct in 5.2.15.

Thanks Slava, will do.

-Paul
__________________
X-Cart Version: 5.2
Reply With Quote
  #7  
Old 05-19-2016, 08:04 AM
  More-Japan's Avatar 
More-Japan More-Japan is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 107
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

So how exactly should we go about making the necessary changes to update custom skin so that we don't get fatal errors? Is it as straightforward as updating a few lines of code or is it more involved process?

If there is a guide or something, it would be greatly appreciated.
__________________
Version 5.2.13

http://www.more-japan.com/
Reply With Quote
  #8  
Old 05-19-2016, 10:59 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

Unfortunately, I can help with adapting your custom skin to the new structure directory as I know neither what the custom modifications were nor what the purpose of these changes is.

It is not that a few words have been changed in the files. The widget now uses a different set of templates and pass data in a different format to the templates.

You will have to look into the directory, check what the new template files are and update your custom changes accordingly.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #9  
Old 05-24-2016, 10:43 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: X-Cart 5.2.14: code changes that you should be aware of

Perhaps this forum thread may help you to fix related issues on your websites:
https://forum.x-cart.com/showthread.php?t=74006

When you face the "Call to a member function ....{your function name there}.... on a non-object", you should
1) locate the place where it is called in your custom module/theme
2) use \XLite\Logger::logCustom('debug', var_export($your_variable_name, true)); line to print the structure of the variable that triggers the error
3) replace the broken method call with getting the value from the array key that seems to be related to that method (for instance, "$c->getCategoryId()" => "$c['id']").
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > News and Announcements


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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:13 AM.

   

 
X-Cart forums © 2001-2018