Hello,
I am working with VM208c and j256. I have joomla installed on mydomain.com/site and virtuemart seo link is mydomain.com/site/eshop.
When a shopper order something either with registering an account or checkout as a Guest there are issues with the mails received by vendor and shopper.
in the shopper order email the following links are wrong.
1. Order link:
http://www.mydomain.com/index.php?option=com_virtuemart&view=orders&layout=details&order_number=1a0f07&order_pass=p_93217
instead of
http://www.mydomain.com/site/index.php?option=com_virtuemart&view=orders&layout=details&order_number=1a0f07&order_pass=p_93217
(joomla installation folder not applied)
2. Product links
http://www.mydomain.com//site/index.php/eshop/category/product-detail
instead of
http://www.mydomain.com/site/index.php/eshop/category/product-detail
(one more "/" is been applied")
3. Store link:
http://www.medomain.com/http://www.mydomain.com/site/index.php/eshop
instead of
http://www.mydomain.com/site/index.php/eshop
the same error links produced also in the vendor notification e-mail.
Also in VM 2 Backend when i try print orders or product a pdf invoice the links has the same errors as above.
Does anyone know why this is happen and how can i fix it?
Thanks in advance.
i find where the issue is and the links are not produced correctly at least for the products at the moment.
Inside template invoice\tmpl\invoice_items.php between at line 45-52 we have
$product_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id );
$baseUrl = shopFunctionsF::getBaseUrl();
// product link must be an absolute URL.
$product_link=$baseUrl.$product_link;
//$product_link =JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .'&virtuemart_product_id=' . $item->virtuemart_product_id;
The issue is in lines 47 and 50 where the baseurl is been merged to to product link. So something goes wrong with shopFunctionsF::getBaseUrl() and doesn't make links correct. I think that the same function produces some sef issues.
So if you leave on line 45 or 52 it will work fine and produce the links correctly.
result:
$product_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id );
//$baseUrl = shopFunctionsF::getBaseUrl();
// product link must be an absolute URL.
//$product_link=$baseUrl.$product_link;
//$product_link =JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .'&virtuemart_product_id=' . $item->virtuemart_product_id;
Please enable the commented stuff again and use
$product_link = shopFunctionsF::getBaseUrl().JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id ,false,-1);
Sorry, but this issue is not solved at all.
For one, the answers only concern the product links. If i get it right, the link is generated in
$product_link =shopFunctionsF::getBaseUrl().JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id ,false,-1);
But in the following lines:
$baseUrl = shopFunctionsF::getBaseUrl();
...
$product_link=$baseUrl.$product_link;
Which means that the BaseUrl is added twice. So you have to comment them out.
The other thing being that there is no answer concerning the order and store link, which are also broken in 2.0.8c
Hello,
It is due to a problem with the editor we are using.
To fix the problem go in file components/com_virtuemart/views/invoice/tmpl/invoice_items.php
and put that line on one line
<a class="default" title="<?php echo $this->vendor->vendor_store_name ?>" href="<?php echo shopFunctionsF::getBaseUrl().JRoute::_('index.php?option=com_virtuemart&view=orders&layout=details&order_number='.$this->orderDetails['details']['BT']->order_number.'&order_pass='.$this->orderDetails['details']['BT']->order_pass); ?>">
this will remove the tabs that have been included , and breaking the routing.
I will be fixed for the version 2.0.8.d
I have solve with other way the vendor link but i didn't post it. I mark the thread as unsolved until the code be tested as recommended from the developers.
Thanks
BL
Quote from: malaclypse on July 09, 2012, 12:50:31 PM
Sorry, but this issue is not solved at all.
For one, the answers only concern the product links. If i get it right, the link is generated in
$product_link =shopFunctionsF::getBaseUrl().JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id ,false,-1);
But in the following lines:
$baseUrl = shopFunctionsF::getBaseUrl();
...
$product_link=$baseUrl.$product_link;
Which means that the BaseUrl is added twice. So you have to comment them out.
The other thing being that there is no answer concerning the order and store link, which are also broken in 2.0.8c
Hello Milbo,
I make the changes as you suggest but doesn't fix the issue. The url that produced is:
mydomain.com/http://myadmain.com/site/eshop.....
i try also comment the other lines of code but i get the same results.
Quote from: Milbo on July 09, 2012, 11:57:55 AM
Please enable the commented stuff again and use
$product_link = shopFunctionsF::getBaseUrl().JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id ,false,-1);
Hello
The correct fix is this one:
http://forum.virtuemart.net/index.php?topic=104988.msg349554#msg349554
Hello
Nothing happens either, i get the same results with the urls.
Thanks.
Quote from: alatak on July 10, 2012, 17:21:02 PM
Hello
The correct fix is this one:
http://forum.virtuemart.net/index.php?topic=104988.msg349554#msg349554
Quote from: alatak on July 10, 2012, 17:21:02 PM
Hello
The correct fix is this one:
http://forum.virtuemart.net/index.php?topic=104988.msg349554#msg349554
This worked with 2.0.8c
In 2.0.8d i still get the error and this solution doesn't work :'(
Hello,
Still in version 208e the store link at footer of the mails is wrong. The other two issues has been resolved and works (order link, products links).
Store link:
http://www.medomain.com/http://www.mydomain.com/site/index.php/eshop
instead of
http://www.mydomain.com/site/index.php/eshop
Please if you can fixed to the next release of 208
thanks
Quote from: DaggaTora on July 16, 2012, 10:25:16 AM
Quote from: alatak on July 10, 2012, 17:21:02 PM
Hello
The correct fix is this one:
http://forum.virtuemart.net/index.php?topic=104988.msg349554#msg349554
This worked with 2.0.8c
In 2.0.8d i still get the error and this solution doesn't work :'(
Neither in 1.0.8e. To make this work I had to comment line 47 and 48.
This has not been fixed in Virtuemart 2.0.18a, and the proposed fixes in this thread is NOT working.
What to do?
Also there is no guideline on what line to put the prosed (but have tried all)
<a class="default" title="<?php echo $this->vendor->vendor_store_name ?>" href="<?php echo shopFunctionsF::getBaseUrl().JRoute::_('index.php?option=com_virtuemart&view=orders&layout=details&order_number='.$this->orderDetails['details']['BT']->order_number.'&order_pass='.$this->orderDetails['details']['BT']->order_pass); ?>">