Could the options available be simply a list of optional products with the title as a p or div tag not linked to edit the product?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jazzdrive3’s picture

Status: Active » Closed (fixed)

You can edit the view mode and have it display almost whatever you want. On the product type you are using, go to Manage Display, and edit the commerce_pado view mode. That is the view mode used when the product type is shown as an add-on.

vaccinemedia’s picture

Thank you for the fast reply! I've attached two images - one is the settings for the product display and the other is how they are rendered in the front end. As you can see in the settings only the image field is set to be displayed yet on the front end the name of the product is shown as a link to edit the product.

vaccinemedia’s picture

Status: Closed (fixed) » Active

Sorry I have to re-activate this ticket as there is now way to prevent the link to edit the product from appearing. What I'm trying to achieve is like this: http://www.housenetwork.co.uk/securepayment.asp but imagine that there's one product display per package with various addon extras per package.

jazzdrive3’s picture

Now I see what you are saying. I had to set the page parameter to TRUE to tell the entity to be rendered in another context. This doesn't print the title. I have updated this in the dev snapshot. As soon as that updates, you can try it out. Works find for me though.

If you want to change your current install, just changed the entity_view call line to, after declaring the global $language variable:

    $renderable_product = entity_view('commerce_product', array($product_add_on->product_id => $product_add_on),
                      'commerce_pado', $language->language, TRUE);
jazzdrive3’s picture

Status: Active » Closed (fixed)
vaccinemedia’s picture

Does the trick! Thanks :)