0

I need to export the products from a website to be sent to a price comparison website.

I have this script for now but i don't know how to add a table header to the php page.

Any info about how i could do this is welcomed.

$RESULT['category_name'] = $category_name;
$RESULT['manufacturer'] = $manufacturer;
$RESULT['prod_model'] = $prod_model;
$RESULT['prod_id'] = $prod_id;
$RESULT['prod_name'] = $prod_name;
$RESULT['prod_desc'] = $prod_desc;
$RESULT['prod_url'] = $prod_url;
$RESULT['prod_image'] = $prod_image;
$RESULT['prod_price'] = $prod_price;
$RESULT['show_product'] = $is_in_stock;
$RESULT['availability'] = $prod_availability;
$RESULT['color'] = $prod_color;
$RESULT['gtin'] = $prod_gtin;
$RESULT['delivery_cost'] = $delivery_cost;

unset($product);

return $RESULT;
Adriaan
  • 17,741
  • 7
  • 42
  • 75
Ciprian
  • 95
  • 1
  • 10
  • 1
    If it's Magento there's probably a plugin available. – CD001 Jan 07 '20 at 14:19
  • @cd001 i am trying to use the php version because the price comparison website updates the price at set hours by accessing the feed link and i need the feed to be updated instantly as i update prices in magento. Using a plugin to create the feed can only generate it every minute using a cron job and not only when the link is accessed by the price comparison website system. – Ciprian Jan 07 '20 at 14:33
  • 1
    In which case you're going to need to bypass Magento completely - so you're going to need to write an SQL query to fetch the info you need from the relevant flat table (e.g. `catalog_product_flat_2`) and echo it out in the correct format for the price comparison website ... is `$RESULT` that response from the query? You probably don't want a table header here, odds are the feed is XML format... though it could be CSV. There's not really enough information about the feed format, or what you've done so far, to be able to answer this question. – CD001 Jan 07 '20 at 15:07

0 Answers0