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.

Customising the CMS /

Problem Creating a Virtual Product page using Subsites/E-Commerce module extension


Reply


1334 Views

Avatar
UndefinedOffset

Community Member, 27 Posts

21 May 2009 at 3:10am

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?