WordPress Business Themes › Forums › Version 7 Themes › CouponPress › assign xml import feed to a Store.
Does anyone know how to assign a tanonomy to the xml import feed.
For example I have a feed from an advertiser called MyShop and in the taxonomy ‘stores’ I have a store called MyShop.
I want yo import all these feed items to the default ‘Category’ and also assign them to ‘MyShop.
Bump.. this has got to be a common question…
It depends on the import file and how are you mapping it. If you have a field for ‘category’ and another field for ‘store’ for each coupon, those coupons will get assigned to those categories/stores on import. So for example if you have those fields in the feed and have three coupons A, B and C, and for the coupon A the value of ‘category’ is ‘shopping’ and the value of ‘store’ is ‘MyShop’, for coupon B the value of ‘category’ is ‘electronics’ and the ‘store’ is ‘Sony’ and for the coupon C the value of ‘category’ is ‘shoes’ and the ‘store’ is ‘Nike’ – these coupons will get assigned to the respective categories / stores. Even if all the coupons are from the same store or belong to the same category, in order to get the assigned, you need to populate the ‘category’ and ‘store’ fields for each of them.
Hi Richard, Thanks for the response.
I added ‘store’ and ‘category’ to the xml feed,
The builtin xml feed import takes them both as [new custom field – save as new]
so after an import I can see both as custom fields when I edit the coupons.
both this ‘category’ item and the ‘store’ item name match case sensitive with existing categories and the store item.
However the are not assigned to the category or store on import.
Hope you can help
Can you provide an example of the xml feed?
Sure np, this is the first item:
<response message="OK" code="0">
<category>Sports and Fitnesss</category>
<description>Extra 20% off Sports Vitamins from MyVitamins</description><title>Extra 20% off Sports Vitamins from MyVitamins</title>
Thanks and regards
Are you mapping the fields ‘category’ to category and the ‘stores’ to stores?
Hi Richard, yes yes yes
You are mapping it wrong. You have to map it to taxonomy store and not to customfield.
I know that stores is a taxonomy, but there is no option to map to a ‘taxonomy store” that is the reason for this post.
I could add this to make it default but as far as I can see the array is seen as the same for both default and custom
$selectArray['store'] = "Post Default - Store";.
$selectArray['store'] = "Post Default - Store";
What would I need to add to allow this mapping please.
Have you tried the ‘Post Deafult – Store’ ? As this seems to be the right option.
You say “As this seems to be the right option.”
Is this working for you?
Can you import an xml feed and assign it to a store taxonomy?
You know “Post Default – Store” is not a provided default option, right.
This is an edit I made to the feed php file.
If you got this working please let me know exactly what you did.
It’s just not working for me…
I tried a new install and it is the same.
If I define a Default post type, it is there to select until an import, then it reverts to a custom post type. The store is then filed in the postmeta table as metakey ‘store’ metavalue ‘myvitamins’ so this method can not be used to to assign a taxonomy store unless there is some code to write it back into ?term_taxonomy ? i guess.
I had hair when I started this.
Richard were you pulling my chain here!!
I just had three coders look at this – the first two failed to get this working and the third needed to edit three files before we could load the feed into associated stores.
Submit your feature requests to our ideas board and it could be included in a future theme update.
or contact our support team