Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Problem Creating a Virtual Product page using Subsites/E-Commerce module extension

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1257 Views
  • UndefinedOffset
    Avatar
    Community Member
    27 Posts

    Problem Creating a Virtual Product page using Subsites/E-Commerce module extension Link to this post

    Recently I was tasked with creating a virtual product page built on Subsites and the E-Commerce modules. My class structure goes like this. SubsitesVirtualProduct which extends VirtualProduct, and VirtualProduct extends Product. The SubsitesVirtualProduct is simply a copy of the SubsitesVirtualPage class with one change to make the product image read only. As for VirtualProduct it's just a copy of VirtualPage with the parent class changed.

    Now onto the problem, when you edit the real product page the virtual product page does not update when the real page is altered. I have found a bit of a hacky way around that by simply calling $this->reloadContent(); in SubsitesVirtualProduct's init method which does update the public page. But when you log into the cms the virtual page has the old values and they refuse to update.

    Anyone have any ideas?

    1257 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.