Download link: https://www.zen-cart.com/downloads.php?do=file&id=2379
Download link: https://www.zen-cart.com/downloads.php?do=file&id=2379
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
toHTML Code:mydomain.co.uk/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0¤cy_code=GBP&language_id=1
The feed is successfully generated, with the currency included together with the price:Code:mydomain.co.uk/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0&language_id=1
I gather that this is correct from Google's point of view and wonder if the '¤cy_code=GBP' in the GET request is actually needed.HTML Code:<g:price>2.75 GBP</g:price>
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
Any logs generated? If the $_GET['currency_code'] is set, the processing looks for that in the currencies class.
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):
This works in that it adds the product_type to the feed,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;
}
}
I would appreciate some guidance on the code changes needed to replace the already generated product_type rather than add a new one.Code:<g:product_type>666</g:product_type> <g:product_type><![CDATA[Gift Vouchers]]></g:product_type>
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
Actually, what I've done hasn't worked as it adds the '666' to all products. Back to the drawing board.
Simon
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.