When I use the same method to create a sidebar as tutorial one, an error message shows on my site: [User Error] Uncaught Exception: Object->__call(): the method 'categorypages' does not exist on 'Product'
I know someone had this problem before, but the solution in the discussion didn't solve my problem since I am using the new code ($Category = $this->Categories()->First(); on line 120).
This is the code I added to Product.php for sidebar to appear.
//Return the Title as a menu title
public function MenuTitle()
//Ensure that the DO shows up in menu (it is needed otherwise sidebar doesn't show when not logged in)