Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Store require store code #92

Open
kzay opened this issue Oct 28, 2020 · 2 comments
Open

Local Store require store code #92

kzay opened this issue Oct 28, 2020 · 2 comments

Comments

@kzay
Copy link

kzay commented Oct 28, 2020

There is actually no way to add a store code when exporting. But if we wanna use the export to feed a local product inventory, that is a mandatory field.

image

@dominictayloruk
Copy link

LOCAL INVENTORY ADS

This allows the store_code specification to be added to the product feed.

More info on the issue can be found here;

We start by copying the original .xml that is generated by the google shopping flux as this will usually be your primary feed. Once copied we can use sed to append the store code to all items in the .xml

cp /usr/html/googleshopping-s1-gb-GBP.xml /usr/html/googleshopping-s2-gb-GBP.xml
LINUX (BASH)
sed -i "s|<g:availability>in stock</g:availability>|<g:availability>in stock</g:availability>\\
<g:store_code>101</g:store_code>\\
<g:store_code>102</g:store_code>\\
<g:store_code>103</g:store_code>|g" googleshopping-s2-gb-GBP.xml
sed -i "s|<g:availability>in stock</g:availability>|<g:availability>in stock</g:availability>\\
<g:store_code>101</g:store_code>|g" googleshopping-s2-gb-GBP.xml
MACOS (ZSH)
sed -i "" "s|<g:availability>in stock</g:availability>|<g:availability>in stock</g:availability>\\
<g:store_code>101</g:store_code>\\
<g:store_code>102</g:store_code>\\
<g:store_code>103</g:store_code>|g" googleshopping-s2-gb-GBP.xml
sed -i "" "s|<g:availability>in stock</g:availability>|<g:availability>in stock</g:availability>\\
<g:store_code>101</g:store_code>|g" googleshopping-s2-gb-GBP.xml

@Casper-O
Copy link
Collaborator

interesting request.

Issue is, that a product might be in stock in Store 101, but not in 102, so to "check" the stock for each store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants