0

Bit of an odd one here, I am experimenting with the Search API, Search DB and Views. I have a view based on Commerce Products. The view works, along with most of it's facets (but that's another story).

I'm running into a strange issue. I have a view based on a search index using Search API and Search_DB. I have access to all the fields that I indexed, but price is presented as the unformatted price in minor units. It is pulled in as "Indexed Commerce Product Price>> Amount (Price >> Amount)"

The issue I'm having is that it's displaying price as 98,000 rather than $980

Why is the formatting changing? and what's the right way to pull that info into my search view? D-Commerce wants the prices in minor units for it's own internal formatting. I have a regular non-search view which has the correct price...

0

To start, if it's a Views view, check you field formatter within the view admin page. You could also hook into it somehow (I'm not entirely sure how, possibly alter the query), to divide the price by 100, but only for formatting.

|improve this answer|||||
  • that's one answer, eventually resolved through UI change. – nizz0k Aug 11 '15 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.