Skip to content

Commit

Permalink
Add fix and adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasGraml11 committed Jan 17, 2024
1 parent d83fbc8 commit e126ca3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/baseline_examples/example-variants.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id parent_id ordernumber name summary description price overriddenPrice url keywords groups bonus sales_frequency date_added sort visibility image0 image1 image2 prop_sale prop_novelty prop_logo prop_availability prop_old_price prop_Basic_rate_price prop_file_type prop_number_of_comments prop_badge attrib_cat attrib_cat_url attrib_brand attrib_color attrib_ratingAvg attrib_ratingCount attrib_free_shipping attrib_type attrib_variant_value
id parent_id ordernumber name summary description price overriddenPrice url keywords groups bonus sales_frequency date_added sort visible image0 image1 image2 prop_sale prop_novelty prop_logo prop_availability prop_old_price prop_Basic_rate_price prop_file_type prop_number_of_comments prop_badge attrib_cat attrib_cat_url attrib_brand attrib_color attrib_ratingAvg attrib_ratingCount attrib_free_shipping attrib_type attrib_variant_value
5444bb0aa92841858ac47ef71c9cbab9 277KTL-v|4987123846879-v|variant1|variant2|variant3 Adidas Sneaker A cool and fashionable sneaker With this sneaker you will walk in style. It's available in green and blue. 44.80 54.80 https://www.store.com/sneakers/adidas.html 277KTL,4987123846879 B2B,student 3 5 2019-10-31T10:20:28+02:00 5 1 https://www.store.com/images/277KTL.png https://www.store.com/images/thumbnails/277KTL.png 1 0 http://www.shop.de/brand.png 4 days 99.9 99.9 Sneakers_Men,Specials_Sale /sneakers,/sneakers/men,/specials,/specials/sale Adidas green\,brown,blue 4.5 11 1 product
variant1 5444bb0aa92841858ac47ef71c9cbab9 variant1 Adidas Sneaker blue 13.99 0.00 https://www.store.com/sneakers/adidas_blue.html https://www.store.com/images/277KTL_blue.png https://www.store.com/images/thumbnails/277KTL_blue.png https://www.store.com/images/badges/new.png Blue
variant2 5444bb0aa92841858ac47ef71c9cbab9 variant2 Adidas Sneaker red 7.49 14.99 https://www.store.com/sneakers/adidas_red.html https://www.store.com/images/277KTL_red.png https://www.store.com/images/thumbnails/277KTL_red.png 50% https://www.store.com/images/badges/sale.png Red
Expand Down
2 changes: 1 addition & 1 deletion resources/baseline_examples/example.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id parent_id ordernumber name summary description price overriddenPrice url keywords groups bonus sales_frequency date_added sort visibility image0 image1 image2 prop_sale prop_novelty prop_logo prop_availability prop_old_price prop_Basic_rate_price prop_variants prop_file_type prop_number_of_comments prop_badge attrib_cat attrib_cat_url attrib_brand attrib_color attrib_ratingAvg attrib_ratingCount attrib_free_shipping attrib_type
id parent_id ordernumber name summary description price overriddenPrice url keywords groups bonus sales_frequency date_added sort visible image0 image1 image2 prop_sale prop_novelty prop_logo prop_availability prop_old_price prop_Basic_rate_price prop_variants prop_file_type prop_number_of_comments prop_badge attrib_cat attrib_cat_url attrib_brand attrib_color attrib_ratingAvg attrib_ratingCount attrib_free_shipping attrib_type
01120c948ad41a2284ad9f0402fbc7d 277KTL|4987123846879 Adidas Sneaker A cool and fashionable sneaker With this sneaker you will walk in style. It's available in green and blue. 44.80 54.80 https://www.store.com/sneakers/adidas.html 277KTL,4987123846879 B2B,student 3 5 2019-10-31T10:20:28+02:00 5 1 https://www.store.com/images/277KTL.png https://www.store.com/images/thumbnails/277KTL.png 1 0 http://www.shop.de/brand.png 4 days 99.9 99.9 {"Blue":{"title":"Adidas Sneaker blue","badge":"https:\/\/www.store.com\/images\/badges\/new.png","price":"13.99","old_price":"","sale":"","image":"https:\/\/www.store.com\/images\/277KTL-blue.png","thumbnail":"https:\/\/www.store.com\/images\/thumbs\/277KTL-blue.png","productUrl":"https:\/\/www.store.com\/sneakers\/adidas-blue.html"},"Red":{"title":"Adidas Sneaker red","badge":"https:\/\/www.store.com\/images\/badges\/sale.png","price":"7.49","old_price":"14.99","sale":"50%","image":"https:\/\/www.store.com\/images\/277KTL-red.png","thumbnail":"https:\/\/www.store.com\/images\/thumbs\/277KTL-red.png","productUrl":"https:\/\/www.store.com\/sneakers\/adidas-red.html"},"Grey":{"title":"Adidas Sneaker grey","badge":"https:\/\/www.store.com\/images\/badges\/sale.png","price":"6.49","old_price":"12.99","sale":"50%","thumbnail":"https:\/\/www.store.com\/images\/thumbs\/277KTL-grey.png","productUrl":"https:\/\/www.store.com\/sneakers\/adidas-grey.html"}} Sneakers_Men,Specials_Sale /sneakers,/sneakers/men,/specials,/specials/sale Adidas green\,brown,blue 4.5 11 1 product
content_ypy44hn5rpk8nggba8vxmpx68d8v7ra pdf304xyz|9424585418519 Aliquam eget vehicula. Nullam blandit in ipsum ac feugiat. Vivamus varius, velit nec. In tempus eleifend orci, eu suscipit dolor pellentesque ac. Morbi. 0.00 0.00 https://www.store.com/documents/pdf304xyz.pdf pdf304xyz,9424585418519 B2B,student 7 23 2019-10-31T10:20:28+02:00 1 1 https://www.store.com/images/pdf304xyz.png https://www.store.com/images/thumbnails/pdf304xyz.png pdf 9 content
2 changes: 1 addition & 1 deletion src/CSV/CSVExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class CSVExporter extends Exporter
{
/** @var string */
private const HEADING = "id\tparent_id\tordernumber\tname\tsummary\tdescription\tprice\toverriddenPrice\turl\t" .
"keywords\tgroups\tbonus\tsales_frequency\tdate_added\tsort\tvisibility";
"keywords\tgroups\tbonus\tsales_frequency\tdate_added\tsort\tvisible";

/** @var string */
public const LINE_TEMPLATE = "%s\t%s\t%s\t%s\t%s\t%s\t%.2f\t%.2f\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s%s%s%s\n";
Expand Down
2 changes: 1 addition & 1 deletion tests/CSVSerializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class CSVSerializationTest extends TestCase
{
/** @var string */
private const DEFAULT_CSV_HEADING = "id\tparent_id\tordernumber\tname\tsummary\tdescription\tprice\t" .
"overriddenPrice\turl\tkeywords\tgroups\tbonus\tsales_frequency\tdate_added\tsort\tvisibility";
"overriddenPrice\turl\tkeywords\tgroups\tbonus\tsales_frequency\tdate_added\tsort\tvisible";

/** @var string */
private const CSV_PATH = '/tmp/findologic.csv';
Expand Down

0 comments on commit e126ca3

Please sign in to comment.