1

How can I set for example the mp3 as first item? Now it takes the products (product reference) from a product display node and display it in order of product creation.

In this example the "CD" was created before "MP3", but I want to be able to always display MP3 before CD.

I use a view with an add to cart field and the option "Attempt to combine like products on the same line item in the cart." checked.

screenshots

0

That checkbox you've mentioned is irrelevant, if I understand your request properly. The Add to Cart form assumes whichever product you reference first is the default product when it first builds the form (i.e. it has a product reference field value delta of 0).

2
  • Yes It will take the product reference field with delta 0. The question is how do I make it take the delta 1?
    – falc0
    Feb 17 '14 at 8:16
  • Well, the simplest thing to do would be to just change the way you're creating products so your desired default is delta 0. If that's untenable in your current situation, then use hook_commerce_product_reference_default_delta_alter() as documented in commerce_product_reference.api.php. Feb 17 '14 at 23:12

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.