yahalimu Posted December 26, 2019 Share Posted December 26, 2019 Yep that fixed it Jack. Thanks. I remember changing to mysqli from mysql many years ago to get bit to work on PHP5, I assumed that would be OK for PHP7 but I take it 7 is more fussy. The last error I am getting is: 'PHP Warning: count(): Parameter must be an array or an object that implements Countable.' This is on the following code. (top line) and also on a similar bit of codebelow using (count($statsArray['qty']) > 0) { if (count($statsArray['price']) > 0) { $warning = true; echo '<p style="margin:auto; text-align:left; padding:10px; 0px">'; printf( "***Warning:*** There are %d products with a price of $0.<br>", $statsArray['price'] ); for ($i = 0; $i < count($statsArrayPrice); ++$i) { echo ' ' . $i . ' - ' . $statsArrayPrice[$i] .'<br>'; } echo '</p>'; } I changed $statsArray['price'] to $statsArrayPrice and it seems to work OK and report all zero quantity items and not error out. I hope this is correct. Otherwise all the code can be ported to Phoenix with minimal changes. Only had to hard code includes directory etc.. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 27, 2019 Share Posted December 27, 2019 (edited) @yahalimuThe following changes should be made. Please try it and let me know if there are any other issues. Find if (count($statsArray['price']) > 0) { and replace it with if (is_array($statsArray['price']) && count($statsArray['price']) > 0) { Find if (count($statsArray['qty']) > 0) { and replace it with if (is_array($statsArray['qty']) && count($statsArray['qty']) > 0) { edited: corrected typo for first change. Edited December 27, 2019 by Jack_mcs Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
yahalimu Posted December 27, 2019 Share Posted December 27, 2019 Hi Jack, That latest code adjustment did not error but also did not list zero quantitiy or zero price products in my installation. Iain Quote Link to comment Share on other sites More sharing options...
yahalimu Posted December 27, 2019 Share Posted December 27, 2019 Using $statsArrayPrice did seem to work ok though. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 27, 2019 Share Posted December 27, 2019 From my previous post, the lines should be changed to if ($statsArray['price'] > 0) { and if ($statsArray['qty'] > 0) { There will be warning notices if error reporting is enabled. I will upload a new version soon that should fix all of the known issues. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Peper Posted February 5, 2020 Share Posted February 5, 2020 Google warnings not going away Error is Mismatched [price] (page crawl) This comes in pricing showing excl Tax on site, the googlefeeder.txt is calculated including Tax Google bot is crawling site excluding Tax Google reports Mismatched [price] Web is setup to show pricing excluding tax in admin with tax rates 0% and 15% What needs to be done? Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 5, 2020 Share Posted February 5, 2020 Regarding the warnings, I will try to get an updated version uploaded soon. Regarding the tax, I have clients that have shops that use tax and others that don't. But they are using the later version, which has not been released, so that might be the reason. Peper 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 7, 2020 Share Posted February 7, 2020 A new version has been uploaded with these changes: Added gtin as an identifier. Added code for Phoenix compatibility. Installation just requires the files to be uploaded for Phoenix. Changed count code to pass php 7.3. Found by member @yahalimu. Changed default http to https in the googlefeeder file. Removed the code to check if mysql is being used. Mysqli is now required. Peper, Mac2256, Smoky Barnable and 2 others 3 2 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
valquiria23 Posted February 7, 2020 Share Posted February 7, 2020 Thank you very much Jack @Jack_mcsfor supporting oscommerce !! Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
zeeshop Posted January 7, 2021 Share Posted January 7, 2021 @Jack_mcs, I am looking to install module which can comply with Google Merchant Centre (GMC) Requirement for Google Free Products Listings. I noticed from your comments in another forum that this may be the best module to achieve this or is there any other? Please advise if This module can work with GMC and if it is compatible to work with Phoenix 1.07.12. It seems like Google can fetch feeds automatically and there is no mention of Google FTP User name/ password as required in googlefeeder.php I tried installing it for testing and received following errors: No warning comes if I stop errors reporting in admin/config.php. Notice: Undefined variable: currentVersion in /homepages/31/dxxxxxxxxx/htdocs/xxxxxxxxx/admin/feeders.php on line 52 Any suggestion pls.Thanks Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 8, 2021 Share Posted January 8, 2021 @zeeshopYes, it works with google. I don't know if it will work with the latest Phoenix version but I think it should. The error is because you didn't upload the Version Checker files (see the installation instructions). Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
zeeshop Posted January 8, 2021 Share Posted January 8, 2021 Thanks, I uploaded the feed on GMC but feed was rejected due to following reason: GMC requires price in this format: I changed the lines as advised in 2019 post on 17/07/19 shown below, but it is showing currency as USD in feed file, but my store default currency is GBP, is there any way to change currency to GBP. Since GMC requires the price field to have the curency specified (i.e. '19.99 USD'), near line 465 I replaced $row->price . "\t" . with $row->price . ' ' . OPTIONS_CURRENCY . "\t" . Thanks Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 9, 2021 Share Posted January 9, 2021 5 hours ago, zeeshop said: currency as USD in feed file, but my store default currency is GBP, Please try changing the currency setting in the googlefeeder.php file. zeeshop 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
zeeshop Posted January 9, 2021 Share Posted January 9, 2021 Thanks, I had to change line 20 & line 63 references from USD to GBP, all working fine now. Quote Link to comment Share on other sites More sharing options...
zeeshop Posted February 21, 2021 Share Posted February 21, 2021 @Jack_mcs, I am noticing on my feed that after 587 product, google feed tsv file is splitting product details in two rows, and on excel/ google sheet display it is not on a relevant column. which I suspect will give error on Google. Is this issue caused due to server memory issue, as I am trying to produce feed for over 3000 products. Does this effect the outcome. do you recommend any solution for this please. Thanks Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 21, 2021 Share Posted February 21, 2021 @zeeshopTrying to handle that many products can cause the script to fail, depending on the server. The split upload option can be used if it is. But when that causes a failure, the feed doesn't complete, which it sounds like it is in your case. I think it might be some character in the product that is confusing the code. Trying adding the ID of the failing product to the skip product ID list and see if the feed goes farther. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
zeeshop Posted February 21, 2021 Share Posted February 21, 2021 1 hour ago, Jack_mcs said: The split upload option can be used if it is. Thanks, is there a split file option available in googlefeeder.php file, I am unable to find it. Thinking of using EasyPopulate to download google compatible feed, it downloads all products but layout is not compatible. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 22, 2021 Share Posted February 22, 2021 10 hours ago, zeeshop said: is there a split file option available in googlefeeder.php file, No, there isn't I apologize for the mistake. I was thinking of Easy Populate. For this addon, there shouldn't be any reason it would fail with that many products when ran as a cron job. It might timeout if ran via admin, depending upon your hosting accounts timeout limit. So try running it as a cron job to see if it completes. zeeshop 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
zeeshop Posted February 23, 2021 Share Posted February 23, 2021 On 2/22/2021 at 2:46 AM, Jack_mcs said: So try running it as a cron job to see if it completes. Thanks, I tried running cron job with same result. I used IONOS Cron Job Manager to do the job, which basically run this page: https://www.site.com/admin/googlefeeder.php?noftp=1 ================================== Ok, I found the problem, this whole issue was caused due to <"> added at the end of HTML code in description. As soon I changed it, all worked properly. Thanks for your support @Jack_mcs Quote Link to comment Share on other sites More sharing options...
zeeshop Posted March 17, 2021 Share Posted March 17, 2021 On 2/21/2021 at 2:40 PM, Jack_mcs said: @zeeshopTrying to handle that many products can cause the script to fail, depending on the server. The split upload option can be used if it is. But when that causes a failure, the feed doesn't complete, which it sounds like it is in your case. I think it might be some character in the product that is confusing the code. Trying adding the ID of the failing product to the skip product ID list and see if the feed goes farther. @Jack_mcs Ok, this line break problem in google feed was ongoing, I tried several ways to solve the issue, such as deleting items, changing description etc. But now what I established is that, as I uploaded hundreds of product using easy populate, some how new products I am trying to upload is cause this issue and starting to break line as below in google feed: Strangely enough when ever I go in Admin side catalogue, all I had to do , open the product and click save, afterward when I generated Google feed, this particular product issue is solved and comes in one line. As I have thousands of products, and opening and closing (by saving) product will take ages. I have no clue what is the reason for this, and how by only opening/ closing making product to display properly in feed, perhaps something to do with the newer version of Easy populate, which may require some minor change. =============== Easy populate, google shopping function seems to bring all products the way I want, but SEO function is not working there, if SEO function can work in easy populate, then my google feed issue will be resolved. Any support will be very much appreciated. Many thanks Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 17, 2021 Share Posted March 17, 2021 It seems the problem would have to be in the description of the product that is failing since, as I understand it, not all products are failing. So if that is the case, all I can suggest is that you try to isolate the part of the description that is causing the problem. zeeshop 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Papanco Posted March 24, 2021 Share Posted March 24, 2021 how can I add a specific feed for the "Local product inventory feed specification"? (https://support.google.com/merchants/answer/3061342?hl=en#zippy=%2Cid---an-identifier-of-the-item) Thanks to anyone who can help me do this Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 24, 2021 Share Posted March 24, 2021 The only additional required field for a local feed is the store code, as far as I know. To add that, find this line $output = "link and change it to $output = "store code\link Then find $output .= preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" . and change it to $output .= "my store\t" . preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" . You have to replace "my store" with your store identifier, which has to match what you use in setting of the feed in your google account. You may also have to adjust some of the other settings in the file. The above hasn't been tested. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Papanco Posted April 12, 2021 Share Posted April 12, 2021 (edited) @Jack_mcs thanks for the reply but I saw that for local products it becomes more complicated: I should also be able to create url as an example at this link: https://support.google.com/merchants/answer/9212322?hl=en with the store code what can I do? Edited April 12, 2021 by Papanco Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 12, 2021 Share Posted April 12, 2021 @PapancoIn the googlefeeder.php file, change the OPTIONS_ENABLED_GOOGLE_UTM setting to 0 or 1, depending on if you are using that google option.. Then find this line define('OPTIONS_GOOGLE_UTM', '?utm_source=GoogleBase1&utm_medium=BaseFeed1&utm_campaign=products'); //see http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55578 and replace it with this if (OPTIONS_ENABLED_GOOGLE_UTM == 0) { define('OPTIONS_GOOGLE_UTM', '?store={my_store_code}'); } else { define('OPTIONS_GOOGLE_UTM', '?store={my_store_code}&utm_source=GoogleBase1&utm_medium=BaseFeed1&utm_campaign=products'); //see http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55578 } As before, be sure to change the "my_store_cde" with yours. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
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.