Silverstripe Version:
SilverStripe 4.13
Question:
Hi everyone, I’ve been trying to use SilverShop in SS4.13, I have no issue with my code until I use “implements Buyable” or “extends OrderItem”.
Basically whenever I use these, I can’t finish the Dev/Build process and I have no idea how to move forward from there. Using pages as products would be way too complicated in that project so I cannot use that solution.
My guess is SilverShop isn’t fully compatible with SS4.13 and that’s why the build keeps crashing.
I leave the code I have even though I don’t think it will be helpful, I also tried creating a class extending OrderItem with no luck.
Any insight is welcome. Thanks in advance.
use SilverShop\Model\Buyable;
use SilverShop\Model\OrderItem\OrderItem;
class RentalReservation extends DataObject implements Buyable {
private static $db = [
'Title' => 'Varchar(128)',
'CheckInDate' => 'Date',
'CheckOutDate' => 'Date',
'GuestsCount' => 'Int',
'Price' => 'Currency'
];
private static $has_one = [
'Client' => Member::class,
'Rental' => RentalObject::class
];
private static $summary_fields = [
'Client.Name' => 'Client',
'CheckInDate.Nice' => 'Reservation Check-in',
'CheckOutDate.Nice' => 'Reservation Check-out'
];
}