VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: alientrader on January 24, 2017, 12:54:57 PM

Title: Virtuemart cart-popup problem; show cart = http , continue shopping = https
Post by: alientrader on January 24, 2017, 12:54:57 PM
I have a problem with the add to cart button, and follow-up from the cart-popup

If I add a product to my shopping cart, it produces the cart popup with 2 options: continue shopping and show cart. The link of the button 'continue shopping' is https://DOMAIN/index.php?virtuemart.... and works fine. The button 'show cart' has the link http://DOMAIN/index.php?option=com_virtuemart&view=cart&lang=nl-nl  and doesn't work because the link is not secure, if I insert this link with https in the browser , it works fine.

My assumption is that this is a problem of the virtuemart template, if this is a virtuemart bug than the forums would be crowded with entries.

Can someone give me a hint where to look for this problem

Joomla 3.6.5 - Virtuemart 3.0.18
Title: Re: Virtuemart cart-popup problem; show cart = http , continue shopping = https
Post by: jenkinhill on January 24, 2017, 13:30:22 PM
Assuming you use a commercial template, check the file at templates/ [yourjoomlatemplate]/html/com_virtuemart/cart/padded.php

The relevant VM default template code in VM3.0.18.9 is:

echo '<a class="continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
Title: Re: Virtuemart cart-popup problem; show cart = http , continue shopping = https
Post by: GJC Web Design on January 24, 2017, 15:30:32 PM
Not sure about 3.0.18.9 but on all my 3.0.18 on https the Go to cart in the popup is wrong as u say.. it is http..

I manually change in the padded.php to a fixed url...  maybe fixed in later 3.0.18's?
Title: Re: Virtuemart cart-popup problem; show cart = http , continue shopping = https
Post by: alientrader on January 26, 2017, 14:40:50 PM
First of all thank you all for pointing me in the right direction

I indeed placed a fixed url in the padded.php, that solves the immediate problem.

the real problem is not solved, ' . $this->cart_link . ' produces a http instead of a https
Title: Re: Virtuemart cart-popup problem; show cart = http , continue shopping = https
Post by: Milbo on February 03, 2017, 14:31:16 PM
I added a switch lately

if(VmConfig::get('sef_for_cart_links', false)){
$this->useSSL = vmURI::useSSL();
$this->continue_link = JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryStr.$ItemidStr);
$this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart',false,$this->useSSL);
}


Title: Re: Virtuemart cart-popup problem; show cart = http , continue shopping = https
Post by: Milbo on February 06, 2017, 21:23:24 PM
I found a small bug, which did not set ssl, when it is enabled in joomla, but not vm. vm3.0.19.5 has the fix for it