| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
X-Cart 5.2.14: code changes that you should be aware of | |||
|
|
Thread Tools |
#1
|
|||||||||
|
|||||||||
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 |
|||||||||
|
#2
|
|||||||
|
|||||||
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 |
|||||||
#3
|
|||||||
|
|||||||
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? |
|||||||
#4
|
|||||||
|
|||||||
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:
line 6: Code:
line 78: Code:
In the deployed CSS file, this renders with a directory title "false" in the path like so: Code:
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 |
|||||||
#5
|
|||||||||
|
|||||||||
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. |
|||||||||
#6
|
|||||||
|
|||||||
Re: X-Cart 5.2.14: code changes that you should be aware of
Quote:
Thanks Slava, will do. -Paul
__________________
X-Cart Version: 5.2 |
|||||||
#7
|
|||||||||
|
|||||||||
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. |
|||||||||
#8
|
|||||||||
|
|||||||||
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 |
|||||||||
#9
|
|||||||||
|
|||||||||
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 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|