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

Multiple Image per Product


Go to End


1434 Views

Avatar
biapar

Forum Moderator, 435 Posts

25 June 2009 at 9:35am

How is possible to insert multiple image for product?

I've read some posts ( http://www.silverstripe.org/archive/show/7715?start=16 ) but I've these error:

Warning] Unknown class passed as parameter
GET /ss/images/iframe/ImageAttachment/8/Image

Line 2553 in C:\xampp\htdocs\ss\sapphire\core\model\DataObject.php
Source

2544 	 * Return the given element, searching by ID
2545 	 *
2546 	 * @param string $callerClass The class of the object to be returned
2547 	 * @param int $id The id of the element
2548 	 *
2549 	 * @return DataObject The element
2550 	 */
2551 	public static function get_by_id($callerClass, $id) {
2552 		if(is_numeric($id)) {
2553 			if(is_subclass_of($callerClass, 'DataObject')) {
2554 				$tableClasses = ClassInfo::dataClassesFor($callerClass);
2555 				$baseClass = array_shift($tableClasses);
2556 				return DataObject::get_one($callerClass,"`$baseClass`.`ID` = $id");
2557 
2558 				// This simpler code will be used by non-DataObject classes that implement DataObjectInterface
2559 			} else {

Trace

    * is_subclass_of(ImageAttachment,DataObject)
      Line 2553 of DataObject.php
    * DataObject::get_by_id(ImageAttachment,8)
      Line 533 of Image.php

Thank you