view · edit · sidebar · attach · print · history

20130610-improve-oddb2xml-pharmacode-smno

<< | Index | >>


Summary

  • Update oddb2xml to handle pharmacode that is started with "0"
  • Delete SMNO if article does not have correct GTIN (GTIN must begin with "7680")

Commits

oddb2xml

Index

  • Restore Zero at the beginning of Pharmacode

Restore Zero at the beginning of Pharmacode

z.B.

  • STOMAHESIVE
  • ERYTHROCIN

Updated Extractor. Then,

 <ART DT="">
    <PHAR>0702883</PHAR>
    <SALECD>A</SALECD>
    <CDBG>N</CDBG>
    <BG>N</BG>
    <QTY>5 Stk</QTY>
    <DSCRD>STOMAHESIVE Hautschutzplatten 10x10cm</DSCRD>
    <DSCRF>STOMAHESIVE feuilles protection 10x10cm</DSCRF>
    ...
 <ART DT="">
    <PHAR>0020209</PHAR>
    <SMCAT>B</SMCAT>
    <SMNO>20258047</SMNO>
    ...

Link

commit

Skip SMNO tag

Some products have GTIN that is not started with "7680".
If GTIN is not started with "7680", then skip SMNO tag.

[1] 1.9.3-p385(#<Oddb2xml::Builder>)> de_idx
=> {:_type=>:pharma,
 :ean=>"8888650404193",   #=> not "7680xxxxxxxxxx"
 :pharmacode=>"0131736",
 :status=>"A",
 :stat_date=>"",
 :lang=>"DE",
 :desc=>"TIGER BALM Salbe rot-stark",
 :atc_code=>"M02AX10",
 :additional_desc=>"Topf 19.4 g",
 :company_name=>"Doetsch Grether AG",
 :company_ean=>"7614700999989"}

z.B.

  • STOMAHESIVE
  • TIGER BALM
  • SOLDAN EM EUKAL

no SMNO.

  <ART DT="">
    <PHAR>0702883</PHAR>
    <SALECD>A</SALECD>
    <CDBG>N</CDBG>
    <BG>N</BG>
    <QTY>5 Stk</QTY>
    <DSCRD>STOMAHESIVE Hautschutzplatten 10x10cm</DSCRD>
    <DSCRF>STOMAHESIVE feuilles protection 10x10cm</DSCRF>
    <SORTD>STOMAHESIVE HAUTSCHUTZPLATTEN 10X10CM</SORTD>
    <SORTF>STOMAHESIVE FEUILLES PROTECTION 10X10CM</SORTF>
    <ARTCOMP/>
    <ARTBAR>
      <CDTYP>E13</CDTYP>
      <BC>768455017287</BC>  #=> !!
      <BCSTAT>A</BCSTAT>
    </ARTBAR>
    <ARTINS>
      <NINCD>13</NINCD>
    </ARTINS>
  </ART>
commit
view · edit · sidebar · attach · print · history
Page last modified on June 10, 2013, at 09:36 AM