VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: jonts25 on April 15, 2015, 19:30:08 PM

Title: Product Details Page - 66 errors - BaseURL misinterpretation
Post by: jonts25 on April 15, 2015, 19:30:08 PM
Hello my people.

Ive designed a custom template from the base of the strapped template.
Every module is working fine except the product details page.
It seems like it is interpreting the BaseURL as http://website.com/index.php/contact-us/ which is wrong
It should be http://website.com/
Therefore all the resources for the detail page are fetched from the wrong URL which leads to a rather crappily drawn website layout.
Maybe someone could say how can i affect this baseurl only in that specific page as other modules/pages are working perfectly fine.

8) 8) 8) 8) 8) 8) 8) 8) 8) 8)
(http://i.gyazo.com/4acecdcf086db7bff3754a44027d86ec.png)
Title: Re: Product Details Page - 66 errors - BaseURL misinterpretation
Post by: genius on April 15, 2015, 20:09:11 PM
Read the damn manual u skrub

http://docs.virtuemart.net/manual.html

8)
Title: Re: Product Details Page - 66 errors - BaseURL misinterpretation
Post by: GJC Web Design on April 15, 2015, 22:24:27 PM
is it using JURI::root () ?
Title: Re: Product Details Page - 66 errors - BaseURL misinterpretation
Post by: jonts25 on April 15, 2015, 23:33:44 PM
Yes ive included the URI:root() in the index.php file, is there anywhere else i should consider adding it?
Ive echoed it in index.php as follows:
<link rel="stylesheet" href="<?php echo JURI::root()?>/templates/<?php echo $this->template; ?>/css/bootstrap.css" type="text/css" media="screen" />
Title: Re: Product Details Page - 66 errors - BaseURL misinterpretation
Post by: GJC Web Design on April 15, 2015, 23:59:24 PM
just as a test if you hard code the correct url does the module still add the contactus (I assume you mean links to the product details page?)

this is normally correct yes -> <?php echo JURI::root()?>/templates/<?php echo $this->template; ?>/css/bootstrap.css" type="text/css" media="screen" />

or perhaps try

<?php  $templatepath = $this->baseurl.'/templates/'.$this->template; ?>

<?php echo $templatepath ?>/css/bootstrap.css" type="text/css" media="screen" />