I am currently employed in a full time position as a software engineer for Pearson UK, building software to allow students around the world sit exams online.
I spend most of my spare time working on my side project vQuiz.
License: MIT License
I am currently employed in a full time position as a software engineer for Pearson UK, building software to allow students around the world sit exams online.
I spend most of my spare time working on my side project vQuiz.
According to the Google documentation, it says "Typically, each variant of a product (different colors or sizes) has its own MPN, so make sure to submit the correct value."
The function variant() in this library calls getGroupIdentifier() which requires an MPN (or GTIN) already be set before it can create the variant, meaning it is using the same one for all variants.
How can this be fixed?
When a variant is created, the already processed image_link
node is encoded a 2nd time with safeCharEncodeURL()
which produces a double encoded string. Namely ' ' (space) becomes %20
which then becomes %2520
.
To fix this, I've used urldecode()
on the image link string before it is ran through safeCharEncodeURL()
// src/LukeSnowden/GoogleShoppingFeed/Item.php:177
$imageLink = $this->safeCharEncodeURL(urldecode($imageLink);
Fix applied to #20
Multiple occourences of bad markdown in the README etc: ###Category Taxonomies.
If i check the example feed for google shopping. the description should be a new tag like so
<description>
(https://support.google.com/merchants/answer/160589?hl=en
In your code it is generated as
<g:description>
.
Can this be changed?
According to the docs it is possible to insert multiple additional_image_links
to the shopping feed.
https://support.google.com/merchants/answer/6324370
It would be nice if this is possible using this library.
There is an option to add the shipping width, height and length?
I don't see the option to add the promotion_id:
lukesnowden/google-shopping-feed/src/LukeSnowden/Item.php
public function promotion_id($promotion_id)
{
$node = new Node('promotion_id');
$this->nodes['promotion_id'] = $node->value($promotion_id)->addCdata();
}
When calling Feed->asRss() when running over the CLI (an Artisan command) I get the error "ErrorException: ob_end_clean(): failed to delete buffer. No buffer to delete in ...\vendor\lukesnowden\google-shopping-feed\src\LukeSnowden\GoogleShoppingFeed\Feed.php:262"
The code runs fine when the same command is run through the browser.
I believe each variant should have a unique id, the example code doesn't suggest assigning a new id each each variant. I'm aware there is a item_group_id, but I believe that that the id should also be unique. It overrides the previous entry with that id if not I think.
Am I missing something or should $variant->id()
be used for each variant?
Fatal error: Call to a member function get() on a non-object in LukeSnowden/GoogleShoppingFeed/Item.php on line 399
The output has the item title tag as <title> and not <g:title>, and the same with link.
Because of this, the feed is flagged as having errors.
I've tested adding _namespace($this->namespace) to the title and link and it works.
public function multipack($multipack)
{
$node = new Node('multipack');
$this->nodes['multipack'] = $node->value($multipack)->_namespace($this->namespace);
}
public function unitPricingMeasure($unitPricingMeasure)
{
$node = new Node('unit_pricing_measure');
$this->nodes['unit_pricing_measure'] = $node->value($unitPricingMeasure)->_namespace($this->namespace);
}
Currently the price node has a float value of:
<g:price>15.00</g:price>
However in the current specification; it requires a second value adjacent to the numeric value of the originating countries currency.
Syntax
For E.g.
<g:price>15.00 USD</g:price>
The specification hasn't got a timestamp of when this was included.
Google Price Specification link
Add a constant list of all the supported possible Currencies? Default to USD
if not present?
Anyone know why namespacing is collapsing running PHP7?
Hello, I am trying to insert a product without identified GTIN and mpn, according to documentation shall be inserted the parameter:
If your product doesn't have both a GTIN and MPN:
Set identifier_exists to no (FALSE)
How fix this? Thanks
It would be nice if we could add custom attributes, for example to include some specific product details.
This data cannot be used by Google directly, but it could be used by other services that support Shopping Feeds.
Do you like this feature?
I could create a PR for this if you'd like.
I'm having different behaviour using your package on my production environment using php 7.0.15 than on my development environment using php 7.0.8.
In my production environment the namespace tags do not seem to be formed correctly - "<g:id/>1" and "<g:price/>12.50".
In my development environment they are created correctly - "<g:id>1</g:id>" and "<g:price>12.50</g:price>".
I noted in issue 10 #10 you have had namespace issues reported in php ^ 7.0. Does this issue match those previously reported? If so did you manage to isolate the cause?
Thanks in advance.
The problem I face is that I need a new instance of the Feed class in order to create multiple feeds in one batch, the Item class is accessing the Feed object through the static singleton implementation, which in my eyes is a design flaw since I only ever can generate one feed in the same batch. Hence I need to be able to instantiate the feed outside a static context to allow for multiple feeds in the same batch.
Please accept my PR #30 it should not break anything and still let you use the static wrapper in the same way :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.