1

We have an API we use for an app in the iOS/Android store, and for the most part works fine.

However, our client has edited products so that there are values in the DEFAULT level that are different than the STORE view.

Is there a way via PHP to force the models/queries to load the STORE level values, and not the DEFAULT?

  • I don't understand exactly in which case you want to do that. Do you have custom model writen for your api or you use default api to get products? – lenko_benko Feb 17 '16 at 15:49
  • We've built a specific app that has certain requirements, and for some reason our client has different values and doesnt want to go through 1000's of products to change them. – Josh Lewis Feb 17 '16 at 19:20
3

For single products:

$product->setStoreId($storeId)->load($productId);

For collections:

$collection->setStoreId($storeId)->load();

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.