문제

Any Google Content API for Shopping gurus?

When submitting a price greater than 999.99 using the GShoppingContent.php library provided by Google I get a parse error that the API can't read the format of the price.

If I round the price up to even without the decimal places ie: only 4 digits it will submit successfully, but it then gets disapproved because it doesn't match the site price.

The number formatting on Google Shopping seems to suggest that they might want the thousands separator as they have prices as 1,234.99 so I also tried that format:

$price = number_format ($price, 2, '.', ',');

But I still get the error.

Does anyone know how to fix this issue?

도움이 되었습니까?

해결책

$price = number_format ($price, 2, '.', '');

$price = number_format ($price, 2);

automatically add the , thousands separator by default, I missed that.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top