Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Google Product Search Feeder II [Support Thread]

    This is the support thread for the to-be-released shortly Google Product Search Feeder II (aka GPSF-2) plugin.

    The plugin has been tested on zc156b through zc158a on PHP versions 7.0 through 8.2 and replaces

    - Google Merchant Center Feeder: https://www.zen-cart.com/downloads.php?do=file&id=1375
    - Google Froogle: https://www.zen-cart.com/downloads.php?do=file&id=319

    I'll post the download link once it's available.

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Google Product Search Feeder II [Support Thread]

    Thank you for making this available @lat9!
    Simon

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Google Product Search Feeder II [Support Thread]


  4. #4
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Google Product Search Feeder II [Support Thread]

    ZC v1.5.8a
    PHP 8.0
    GPSF v1.0.0
    New install, not converting from a previous version.

    Admin > Tools > Google Product Search Feeder II

    Generate Feed gives 'Request failed, Gone (410).'

    If I remove the currency_code portion from the GET request URL

    HTML Code:
    mydomain.co.uk/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0&currency_code=GBP&language_id=1
    to

    Code:
    mydomain.co.uk/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0&language_id=1
    The feed is successfully generated, with the currency included together with the price:

    HTML Code:
    <g:price>2.75 GBP</g:price>
    I gather that this is correct from Google's point of view and wonder if the '&currency_code=GBP' in the GET request is actually needed.

    I might have overthought all of this and there may exist a simple solution.

    Edit: this is on a local dev server (WAMP) with self-signed SSL
    Last edited by simon1066; 15 Nov 2023 at 07:44 PM.
    Simon

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Google Product Search Feeder II [Support Thread]

    Any logs generated? If the $_GET['currency_code'] is set, the processing looks for that in the currencies class.

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Google Product Search Feeder II [Support Thread]

    Quote Originally Posted by lat9 View Post
    Any logs generated? If the $_GET['currency_code'] is set, the processing looks for that in the currencies class.
    No logs, I'll delve deeper.
    Simon

  7. #7
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Google Product Search Feeder II [Support Thread]

    Quote Originally Posted by simon1066 View Post
    No logs, I'll delve deeper.
    Some plonker(me) had added a currency redirect to 410 in .htaccess - when its contents were brought in from another site. All's working now.
    Simon

  8. #8
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Google Product Search Feeder II [Support Thread]

    These PHP extension classes are new to me, but as I wanted to create a custom product_type (I used 666 as a test) for category 66 I used this code in a new classes file (includes/classes/gpsf/gpsfKb.php):

    PHP Code:
    <?php
    /**
     */
    class gpsfKb extends gpsfBase
    {
        public function 
    getProductsAttributes(string $products_id, array $product, array $categories_list$cPath '66', array $custom_fields): array
        {
            
    $extension_custom_fields = ['product_type' => '666',];

            return 
    $extension_custom_fields;
        }
    }
    This works in that it adds the product_type to the feed,
    Code:
    <g:product_type>666</g:product_type>
    <g:product_type><![CDATA[Gift Vouchers]]></g:product_type>
    I would appreciate some guidance on the code changes needed to replace the already generated product_type rather than add a new one.

    I think that this plugin's 'site-specific additions to a product feed' is going to be a stretch for most non-coders, like me, so hopefully this example will get the ball rolling.
    Simon

  9. #9
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Google Product Search Feeder II [Support Thread]

    Actually, what I've done hasn't worked as it adds the '666' to all products. Back to the drawing board.
    Simon

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Google Product Search Feeder II [Support Thread]

    Quote Originally Posted by simon1066 View Post
    These PHP extension classes are new to me, but as I wanted to create a custom product_type (I used 666 as a test) for category 66 I used this code in a new classes file (includes/classes/gpsf/gpsfKb.php):

    PHP Code:
    <?php
    /**
     */
    class gpsfKb extends gpsfBase
    {
        public function 
    getProductsAttributes(string $products_id, array $product, array $categories_list$cPath '66', array $custom_fields): array
        {
            
    $extension_custom_fields = ['product_type' => '666',];

            return 
    $extension_custom_fields;
        }
    }
    This works in that it adds the product_type to the feed,
    Code:
    <g:product_type>666</g:product_type>
    <g:product_type><=!=[=C=D=A=T=A=[Gift Vouchers]=]=></g:product_type>
    I would appreciate some guidance on the code changes needed to replace the already generated product_type rather than add a new one.

    I think that this plugin's 'site-specific additions to a product feed' is going to be a stretch for most non-coders, like me, so hopefully this example will get the ball rolling.
    At this point, the gpsfFeedGenerator class doesn't acknowledge an override for the product_type, using either a fixed value or a selection from the product's master-category's name 'tree'. I've created a change-request (https://github.com/lat9/gpsf/issues/11) on the GPSF GitHub repository.

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. v150 Google Merchant Center Feeder for ZC v1.5.x [Support Thread]
    By DivaVocals in forum Addon Admin Tools
    Replies: 502
    Last Post: 19 Sep 2023, 06:04 PM
  2. Google Base Feeder Support Thread [OLD]
    By numinix in forum All Other Contributions/Addons
    Replies: 3562
    Last Post: 2 Apr 2012, 06:30 PM
  3. Search Helper Support Thread
    By swguy in forum All Other Contributions/Addons
    Replies: 18
    Last Post: 9 Nov 2011, 11:14 AM
  4. Windows Live Product Search Contribution Support Thread
    By numinix in forum All Other Contributions/Addons
    Replies: 209
    Last Post: 3 Jul 2009, 08:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR