Table of Contents

Marc Cain

xml feed is converted to csv on sg01 (bash marccain/transform_feed.sh), after conversion start feed import on index03: python /mnt/storage/var/live/indexer/scripts/update/feedUpdate.py /mnt/storage/var/etc/v3/feedUpdate.json 2788

Changes at Post Processor / Creating new Post Processor

Implementation

1. clone V4 Feed Import project
2. Switch directories
 cd src/feed_import/ 
3. Create File or open Existing
 touch post_proc_<SHOP_NAME> 
4. in case of a new processor file

Testing

 scp <file> index03:~/.local/lib/python2.7/site-packages/feed_import/ 

NOTE: (in case of change: rename existing file before copying in case of rollback)

5. Use feed import calls (index03)
 python /mnt/storage/var/live/indexer/scripts/update/feedUpdate.py /mnt/storage/var/etc/v3/feedUpdate.json <SHOP_ID> 
/home/picalike/.local/bin/v3_feed_import /mnt/storage/var/etc/v3/feedImport.json
 python /mnt/storage/var/live/indexer/scripts/update/feedUpdateList.py /mnt/storage/var/etc/v3/feedUpdate.json 

NOTE: check if your feed is currently updated and copy update id if thats the case

 python /mnt/storage/var/live/indexer/scripts/update/feedUpdateCancel.py /mnt/storage/var/etc/v3/feedUpdate.json <UPDATE_ID> 

Post Testing

<HTML><ol></HTML>

Create package

<HTML><ol></HTML>

 pip install /tmp/feed_import-0.1.15.tar.gz --no-deps --user 

Not available Hack

Customers
HirmerGG
Eckerle

Summary

The customers want to display products declared as “ist_reduziert” in their feed to be marked as “sale” in the PCI and Visualytics Frontends. In addition to that, they don't want products marked as “sale” in their results when requesting the API.

Implementation

1. File

cd /home/picalike/.local/lib/python2.7/site-packages/feed_import
vim post_proc_hirmer.py

2. Logic

              '''
              The solution below is used to mark sale products for filtering them out of product responses via the API
              Product state can be 0 = product not available
                                   1 = product available
                                   2 = product in sale ~= handling similar to not available in further processing
              '''
              if avail and row[reduced_col] != "ja":
                   sizes_avail.append("1")
                   row[reduced_col] = "nein"
              elif row[reduced_col] == "ja":
                   sizes_avail.append("2")
              else:
                   sizes_avail.append("0")

There are two steps in the implementation.

<HTML><ol></HTML>