Call to undefined method getDetailUrl

I have created a product with some variants of it.Example I have some bags and I am trying to add multiple colors of that bag. I have created the variants for different colors, published and yet I have this getDetailURL error. Is tehre any particular relation that I should make more for variants?

Call to undefined method getDetailUrl in class Pimcore\Model\DataObject\Folder

AbstractObject->__call(‘getDetailUrl’, array())
in app/Resources/views/Shop/detail.html.php (line 29)

    $this->extend('layout.html.php');    
> $this->placeholder('object_seotitle')->set( $this->product->getSeoName() );    
> $this->placeholder('object_seodescription')->set( $this->product->getDescription() );    
> $this->placeholder('canonical')->append('<link rel="canonical" href="' . Pimcore\Tool::getHostUrl() . $this->product->internalGetBaseProduct()->getDetailUrl().'"/>');    
> $this->headLink()->appendStylesheet('/static/css/shop-homepage.css', "screen");?>