Alter Data_Feed Output


i've to add currency to price into data_feed export, how can do it?


The google price fields already do this for you.

My cs-cart version is 4.2.4, i've see the changelog and this featured is added on 4.3.7... the https protocol for the product url and product image url are added on 4.3.10.

Then suggest you either upgrade to 4.3.7 and then install google_export or work with a developer to add that functionality for you to your version.

- app/schemas/exim/products.php

try to add

'Google price' => array(
    'table' => 'product_prices',
    'db_field' => 'price',
    'process_get' => array('fn_exim_google_export_format_price', '#this', '#key', false, false),
    'export_only' => true,


        'Exceptions type' => array(
            'db_field' => 'exceptions_type'

- app/schemas/exim/products.functions.php

add to the end of file

function fn_exim_google_export_format_price($product_price, $product_id = 0, $use_discount = false, $include_tax = false)
    static $auth;
if (empty($auth)) {
    $auth = fn_fill_auth();

$product = fn_get_product_data($product_id, $auth, CART_LANGUAGE, false, false, false, false, false, false, false);

if ($use_discount) {
    // fn_calculate_cart_content is required to get the correct discounted price
    // with taxes applied, if necessary
    $product['amount'] = 1;
        fn_generate_cart_id($product_id, array()) => $product
    ), $cart, $auth);
    fn_calculate_cart_content($cart, $auth, 'S', true);
    $product_price = $cart['total'];
} else {
    fn_get_taxed_and_clean_prices($product, $auth);

    if ($include_tax) {
        $product_price = empty($product['taxed_price']) ? $product['price'] : $product['taxed_price'];
    } else {
        $product_price = empty($product['clean_price']) ? $product['price'] : $product['clean_price'];

$price = fn_format_price($product_price, CART_PRIMARY_CURRENCY, null, false);
return $price . ' ' . CART_PRIMARY_CURRENCY;


- clear cache

(!) Not tested, code copied from Google export addon

P.S. If you are familiar with hooks, it can be done with the My changes module

Is he licensed to use the code from an addon in a future (to him) release?

It should be addressed to CS-Cart license department. If not, the code should be created from scratch. But I think the idea is clear.