Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Adding Additional Images


Go to End


3 Posts   1559 Views

Avatar
jbundy

Community Member, 8 Posts

16 September 2011 at 7:14am

Edited: 16/09/2011 7:16am

I've read all throughout this forum and see that people have touched on this topic quite a bit, but there are no definitive answers. Either the posts raise the question and go unanswered or it's years old.

I am looking to add the option to include multiple images to the e-commerce module. I have tied many posted solutions but nothing seems to work. I am currently running e-eCommerce module 8.2-rc1 and the payment module 0.3 and have dataobject_manager installed.

This post seems to get me close, but it still does not seem to work.

I'm getting various error messages when I add this block of code to my ecommerce/code/products/Product.php. I assume I am adding it in the wrong spot.

  $MyImageManager= new DataObjectManager(
         $this,   
         'Images',
         'Product_Image'
      );
      $fields->addFieldToTab("Root.Content.Images", $MyImageManager);

I'm not sure if this is the right direction or if I'm barking up the wrong tree. Any suggestions or help would be appreciated.

-- John

Avatar
jbundy

Community Member, 8 Posts

17 September 2011 at 7:54am

Isn't there anyone willing to help, or does this just go down as another unanswered posts?

Avatar
Nicolaas

Forum Moderator, 224 Posts

7 November 2011 at 12:15am

Hey

Sorry for the slow reply.

You can extend the produt Page and add more images OR you can decorate it. I have done both and that works great.

If you need more help with this then I can provide some examples.

Cheers

Nicolaas