Virtuemart cart-popup problem; show cart = http , continue shopping = https

Started by alientrader, January 24, 2017, 12:54:57 PM

Previous topic - Next topic

alientrader

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

jenkinhill

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>';
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

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?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

alientrader

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

Milbo

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);
}


Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/