Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatically send data feed to Froogle


gottaloveit

Recommended Posts

Hi Jack,

sorry, I may misunderstand you, but there is an option 3.

line 402 does what I need;

 if (OPTIONS_ENABLED_INCLUDE_TAX == 3) {

Option 2 says 

define('OPTIONS_TAX_CALC', (OPTIONS_ENABLED_INCLUDE_TAX == 2 ? (OPTIONS_TAX_RATE/100) + 1 : '1')); //UK. US tax rate - US is ignorded since it is 1

so maybe you meant:

if(OPTIONS_ENABLED_INCLUDE_TAX == 1 || OPTIONS_ENABLED_INCLUDE_TAX == 2) $output .= "\ttax";

Best regards

Christoph

Link to comment
Share on other sites

There's nowhere to set it to 3, unless one doesn't following the instructions. The instructions say to set it to 0, 1, or 2 but the code checks for 3. See this

define('OPTIONS_ENABLED_INCLUDE_TAX', 0);       //0 = no tax, 1 = uses google method, 2 = UK Vat

 

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

Well whatever, I have to set it to 3 because without it no tax calculation (with differing taxes for e.g. food) would be done. 

There is an option which is checked for, but it does not exist?

By the way my middle name is PIA since now, I guess. :wink:

Best regards

Christoph

Link to comment
Share on other sites

  • 2 months later...

Hello,  How can i edit the following to get the Image_Link url to pull from the 1st Large Image vs the Main Image which is only the smaller thumbnail? 

in googlefeeder.php   believed i needed to change this line

CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url,

 to 

CONCAT( '" . $imageURL . "' ,products_images) AS image_url,

But the above didn't work.  products_images is it's own table not a sub of the products line the thumbnails, so may need edit elsewhere ?  

Thanks,
Tiffany  (BS Edge)

Link to comment
Share on other sites

I'm  not sure I understand but if you are saying your image name is not stored in the products table then that is a non-standard setup and I won't be able to help you here.

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

4 hours ago, Jack_mcs said:

I'm  not sure I understand but if you are saying your image name is not stored in the products table then that is a non-standard setup and I won't be able to help you here.

It's a standard BS Edge setup/table - apologizes i'm probably not using the correct terminology - the right image is currently where the code pulls the image url  Products>Products_image, however this is just the thumbnail image.  The left is where the first of the larger images are stored i'd like to use as the url  Product_Images > Image.  

image.png.8b53d091a19b97862f6badbc40cbed3b.pngimage.png.8e359b689d8833c2d5f9c80d97e11b4c.png     

Link to comment
Share on other sites

OK, I understand. You can try this. It might work though I'm not sure how it will handle more than one additional image.

Find

CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url,

and change it to

CONCAT( '" . $imageURL . "' ,products_images.products_image) AS image_url,

A few lines down, find

products,

and add this after it

products_images,

and find

WHERE products.products_id=products_description.products_id 

and add beneath it

AND products.products_id=products_images.products_id

Good luck. :)

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

Awesome!  Thanks so much @Jack_mcs  That worked.   

one minor change from above  "products_images.products_image"  to "products_images.image"  and it's pulling the first image URL if multiple exist and that's exactly what I wanted. 

Thanks again.  :-) 

Link to comment
Share on other sites

  • 4 weeks later...

A new version has been uploaded with these changes:

  • Added the OPTIONS_USE_IMAGE_TABLE to cause the image to be loaded from the products_image table (2.3 only).
  • Changed the condition field to be loaded from the products description table instead of the products table. Found by member kru.
  • Changed the code to limit the length of the title to 150 characters.
  • Changed the code that handles the taxes. An invorrect value caused VAT to be ignored.
  • Removed filename definitions.

 

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

  • 1 month later...

Yes, It is. Many times it is because the code can't figure out which database handler is running. To see if that is the problem, change this line in the googlefeeder.php file

$myfetch_mysql = ($use_mysqli ? mysqli_fetch_object : mysql_fetch_object);
 

to

$myfetch_mysql = mysqli_fetch_object;

If that doesn't work, then change it to

$myfetch_mysql = mysql_fetch_object;

If that doesn't fix it, you need to find out what the error is. after the line near the top that has application_top.php in it, add the following and then run the script to see if it shows the error.

  error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED);
  ini_set('display_errors','1');

 

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

Hi Jack,

All three ways continue to give me nothing but a white screen. 

Don't know if it means anything or not, but I'm also getting a warning on the feeders.php screen in bold red text about not having Version Checker installed.

Yet, I do.  This installation is only weeks old.  ???

- Andrea

Link to comment
Share on other sites

I don't recall if that will cause a failure or not. But it is just an upload to install Version Checker so I suggest trying that first.

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

I installed version checker via the link you gave me.

I don't quite understand what that 'other' version checker link is my Admin/Tools area because all of the files included with the one you gave me are totally new to my system.  ???

Admin/Includes/Functions/version_checker.php is a new file for me

So is Admin/Includes/Languages/English/version_checker.php

Anyway...it's still not working.  Will comb thru the settings again and see if I've missed something.

- Andrea

 

Link to comment
Share on other sites

What you just installed is my Version Checker addon that I wrote years ago as a way for shop owners to check for new updates on my addons, or of any addon that installed it. The idea of it was adopted into the 2.3 version at some point but the two are totally separate. The one that was in your shop will check for updates to the oscommerce version you are using.

As for the problem, if I understand you correctly, changing the error reporting line didn't cause anything to display. If that is correct and if your host uses a control panel that records errors (cpanel does) then you can view the error there. Without knowing what the error is, it is difficult to troubleshoot. Although a common reason for a white screen is a missing file or one in the wrong location.

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

I've tried everything imaginable and still cannot get this working.

Had it for years in my old 2.2 site and it's such a simple, little contrib to install, very frustrated now.

When I run it in Firefox, I just get a white screen.

When I run it in Chrome, I get:  This page isn't working.  Yoursite.com is currently unable to handle this request.  HTTP Error 500

This is a new install (a month old) of 2.3.4.1 CE with PHP 7.0 and MySQL 5.6.39

Any ideas? 

- Andrea

 

Link to comment
Share on other sites

I just installed it into a test shop running 7.1 and it ran fine. There were some warnings that should be fixed but they didn't stop the feed from being created. A white screen and a 500 error means there is some fatal error occurring. Since the script runs fine for me I have to think it is a problem with your installation. Does It fail if you load the script directly, like https://your site.com/admin/googlefeeder.php

 

If that fails, try uploading the file after renaming it and then access it directly, like https://your site.com/admin/googlefeeder_test.php

If it still fails, you will need to determine what the error is.

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

If I try to access it directly, shouldn't I be prompted to log in to Admin? 

It's not.  So...I'm wondering if that means anything. 

- Andrea

Link to comment
Share on other sites

How about this?  Finally found something:

[27-Jun-2018 18:11:35 America/New_York] PHP Warning:  require(includes/classes/logger.php): failed to open stream: No such file or directory in /home/xxxxx/public_html/admin/includes/application_top.php on line 83

Line 83 in application top reads:

// initialize the logger class
  require('includes/classes/logger.php');

But, I DO have logger.php in the catalog/admin/includes/classes folder.  Looks like this:

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  class logger {
    var $timer_start, $timer_stop, $timer_total;

// class constructor
    function __construct() {
      $this->timer_start();
    }

    function timer_start() {
      if (defined("PAGE_PARSE_START_TIME")) {
        $this->timer_start = PAGE_PARSE_START_TIME;
      } else {
        $this->timer_start = microtime();
      }
    }

    function timer_stop($display = 'false') {
      $this->timer_stop = microtime();

      $time_start = explode(' ', $this->timer_start);
      $time_end = explode(' ', $this->timer_stop);

      $this->timer_total = number_format(($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0])), 3);

      $this->write(getenv('REQUEST_URI'), $this->timer_total . 's');

      if ($display == 'true') {
        return $this->timer_display();
      }
    }

    function timer_display() {
      return '<span class="smallText">Parse Time: ' . $this->timer_total . 's</span>';
    }

    function write($message, $type) {
      error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' [' . $type . '] ' . $message . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
    }
  }
?>

Now I'm stuck. 

- Andrea

Link to comment
Share on other sites

3 hours ago, puggybelle said:

If I try to access it directly, shouldn't I be prompted to log in to Admin?

Yes. You need to login first and then click in the url box and change it.

I think the problem is that your admin is not a directory in your shop. The script is ran in admin but switches to use the shops files and assumes the shop is one level up. If it isn't, it will fail. To fix that, in the googlefeeder.php file, change this line

chdir('../');

to this

chdir('/home/your user name/public_html/');

Be sure to replace "your user name" with the actual username and add the directory the shop is in after the public_html/. You need to adjust the whole line to match your site. You can find the correct path in the document_root string in the includes/configure.php file.

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

define('DIR_FS_DOCUMENT_ROOT', '/home/xxxxxx/public_html/');

I changed the googlefeeder.php file to:

chdir('/home/xxxxxx/public_html/');

Still won't run.  Shop is in the root folder.

- Andrea

Link to comment
Share on other sites

The logger.php file is not part of this addon or a core file. From what you posted, it is in the admin directory. But the google script runs using the shops directory. That shouldn't be a problem normally but I suspect, from the name of that file, that it is trying to track things and it can't be found when the script changes locations. All I can suggest is that you copy that file to the shops classes directory. As long as it doesn't fail on any dependencies, it should work.

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

It is a core file with the install of osC 2.3.4.1 CE

Otherwise, I wouldn't have it.

Admin/Includes/Classes/logger.php

logger.PNG.bb7cf7993f51b7b9cc4cea9ab3d3057c.PNG

It's very late now.  I'll try what you suggested tomorrow.  Thanks for your help!

- Andrea

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...