DavePace Posted October 7, 2023 Posted October 7, 2023 Since upgrading to version 6.5.2 we have the following issue: For reference our shop is located at https://www.airbornesappers.org.uk/shop/index.php We do have products with a Sale price entered, which are less than retail and greater than zero In Store Settings - Features we have Sales Mode set to Per Product, with Number of sale items to display set to 20 I don't know if the upgrade to 6.5.2 has caused this, all I can say is that prior to the upgrade Sale Items were displayed in the Sale Items category I've searched other topics and checked as much as I know what to check but can't fix this error Any help appreciated Thank you 1 Quote
bsmither Posted October 7, 2023 Posted October 7, 2023 Using a programmer's text editor, please make this edit. In /classes/catalogue.class.php, near line 893: From: $GLOBALS['catalogue']->searchCatalogue((int)$_GET['cat_id'], $page, $catalogue_products_per_page); To: $GLOBALS['catalogue']->searchCatalogue($_GET['cat_id'], $page, $catalogue_products_per_page); The variable $_GET['cat_id'] could actually contain the value 'sale'. Should this text value be cast to a numerical type, it equals 0, for which there is nothing to be found. The use of (int) was added in an attempt to solve some other problem. 1 Quote
DavePace Posted October 7, 2023 Author Posted October 7, 2023 Hi and thank you for your quick reply I tried to make the change you suggested by opening the file in code view in Dreamweaver, but I couldn't find the text line you mentioned. I even looked for parts of the text usin CTRL + F but still not found in /classes/catalogue.class.php Any further help welcome Thank you Quote
bsmither Posted October 7, 2023 Posted October 7, 2023 (edited) Wow! Really messed that one up. It's in /classes/cubecart.class.php, line 893. Note: I would discourage using DreamWeaver to edit PHP code files. I do not know about the latest versions, but earlier versions insisted on prepending the "byte-order-mark" to files -- which will cause strange errors. Edited October 7, 2023 by bsmither Quote
DavePace Posted October 7, 2023 Author Posted October 7, 2023 No worries, again thank you for your quick reply I'll get that edit done and let you know how it goes Thank you for your advice regarding editing php in Dreamweaver, I'll get an alternative editor sorted out Appreciate your help Quote
bsmither Posted October 7, 2023 Posted October 7, 2023 Having looked into the DreamWeaver BOM issue, it seems that, if the documentation agrees with the version of DreamWeaver you are using, there is a default setting that can be established for when one is editing a PHP code file. Also, each editing session can have some sort of document properties set for that session. Quote
DavePace Posted October 8, 2023 Author Posted October 8, 2023 Hi I've made the change to cubecart.class.php and all is now working prefectly i.e. all sale items are appearing in the corresponding category I downloaded Notepad++ to edit the file, which has done the job perfectly, nice simple programme. Should also take away any concerns that Dreamweaver might be doing some odd things that aren't obvious Thank you for your help, very much appreciated Quote
DavePace Posted October 15, 2023 Author Posted October 15, 2023 On 10/12/2023 at 9:38 AM, cqpbert said: notepad ++ is awesome for almost all things text related IMHO. Just my $.02 I don't know PHP, I just make minor edits to fix the sort of issues detailed in this thread, but good to know I picked an editor that's up to the job. I found it very easy to use, no fuss, no frills just a nice clean, simple program. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.