Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

assign xml import feed to a Store.

  • Mark
    Mark
    Newbie 12 points
    July 25, 2013 at 1:54 pm

    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.

  • Mark
    Mark
    Newbie 12 points
    July 26, 2013 at 12:21 pm

    Bump.. this has got to be a common question…

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 26, 2013 at 9:01 pm

    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.

    Kind regards,

    Richard

  • Mark
    Mark
    Newbie 12 points
    July 26, 2013 at 11:22 pm

    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

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 26, 2013 at 11:37 pm

    Can you provide an example of the xml feed?

  • Mark
    Mark
    Newbie 12 points
    July 26, 2013 at 11:42 pm

    Hi Richard,

    Sure np, this is the first item:


    <response message="OK" code="0">
    <item>
    <merchant>MyVitamins</merchant>
    <store>MyVitamins</store>
    <category>Sports and Fitnesss</category>
    <mid>1234</mid>
    <ccode>SPORT1</ccode>
    <description>Extra 20% off Sports Vitamins from MyVitamins</description><title>Extra 20% off Sports Vitamins from MyVitamins</title>
    <url>http://www.affiliate.com/cread.php?v=4454&t=xxxxxx&p=http://www.myvitamins.com/offers/sports-vitamins.list</url>
    <start_date>2013-07-26 00:00:00</start_date>
    <end_date>2013-07-31 23:59:59</end_date>
    <merchanturl>http://www.myvitamins.com</merchanturl>
    </item>

    Thanks and regards

    Mark

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 28, 2013 at 8:49 am

    Are you mapping the fields ‘category’ to category and the ‘stores’ to stores?

  • Mark
    Mark
    Newbie 12 points
    July 28, 2013 at 9:29 am

    Hi Richard, yes yes yes

    Attachments:
    You must be logged in to view attached files.
  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 28, 2013 at 10:02 am

    You are mapping it wrong. You have to map it to taxonomy store and not to customfield.

  • Mark
    Mark
    Newbie 12 points
    July 28, 2013 at 10:17 am

    Hi Richard,

    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";.

    What would I need to add to allow this mapping please.

    Thanks

    Mark

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 28, 2013 at 10:21 am

    Have you tried the ‘Post Deafult – Store’ ? As this seems to be the right option.

  • Mark
    Mark
    Newbie 12 points
    July 28, 2013 at 11:10 am

    Richard,

    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.

    Many thanks

    Mark

  • Mark
    Mark
    Newbie 12 points
    July 28, 2013 at 11:25 am

    It’s just not working for me…

    Attachments:
    You must be logged in to view attached files.
  • Mark
    Mark
    Newbie 12 points
    July 28, 2013 at 4:12 pm

    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.

  • Mark
    Mark
    Newbie 12 points
    July 29, 2013 at 8:50 pm

    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.

Viewing 15 posts - 1 through 15 (of 19 total)