News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

non https in Add To Cart popup forced https sites

Started by GJC Web Design, December 29, 2016, 23:15:32 PM

Previous topic - Next topic

GJC Web Design

Have seen & fixed this on 4 sites today

J3.5.6/VM3.0.16 & 18

On a clean browser on sites with Joomla forced Global https  when you Add to Cart from anywhere the popup pops, the cart module ajax updates (shows product)
then you click the Go to Cart link and the cart is empty .. completely repeatable

If you close the popup and use the link from the Cart module to Go To Cart all OK

After browsing away from the empty cart and later adding all is OK - also the "lost" product reappears as the correct session is used

The https isn't present in the $this->cart_link in padded.php

ATM I fix by creating a hidden Cart menu and hard coding that in padded.php with https
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

xtech86

Hello,

How are you implementing HTTPS on the site? Just via Joomla!? or via Joomla! and Htaccess?

Implementing it via Htaccess is always recommended.

Studio 42

Use jroute in padded to add sef link and it work.
jRoute::_('index.php&option=com_virtuemart&view=cart');
I always dont understand why this was full removed, and not an option, many vm user complain because customer have no sef link on going to the cart from modal.

GJC Web Design

Hi S42,

using JRoute::_('index.php&option=com_virtuemart&view=cart'); still doesn't pick up the hidden cart menu slug

I get in the popup  ->  /index.php&option=com_virtuemart&view=cart

in the cart module go to cart link

/cart

even adding the correct Itemid I just get  /index.php&option=com_virtuemart&view=cart&Itemid=226


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

Studio 42

I think that the router have a bug, this should always work and worked always for me.
Is this in the last beta only?

GJC Web Design

vm3.0.18 ...  if I get some time will try and look further
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

Jumbo!

#6
Quote from: GJC Web Design on December 30, 2016, 16:02:50 PM
using JRoute::_('index.php&option=com_virtuemart&view=cart'); still doesn't pick up the hidden cart menu slug

I get in the popup  ->  /index.php&option=com_virtuemart&view=cart
Are you sure you are correctly overriding - components/com_virtuemart/views/cart/tmpl/padded.php

It works great for me.

To ensure it always generate a https url you can use -

<?php echo JRoute::_('index.php&option=com_virtuemart&view=cart'truetrue); ?>

emedina

why don't you redirect all http requets with .htaccess and don't use overrides?

Milbo

Quote from: Studio 42 on December 30, 2016, 13:35:06 PM
I always dont understand why this was full removed, and not an option, many vm user complain because customer have no sef link on going to the cart from modal.


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

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

Studio 42

Quote from: Milbo on January 04, 2017, 22:03:16 PM
Quote from: Studio 42 on December 30, 2016, 13:35:06 PM
I always dont understand why this was full removed, and not an option, many vm user complain because customer have no sef link on going to the cart from modal.


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

There is an option, ...
NICE, you make many vm user happy ;)

Milbo

and updated to $this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart',false,$this->useSSL);

Yeh and when someone wanna help, he writes a patch so that the hidden option becomes visible.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jumbo!

Milbo,

It should be -

$this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart', true, $this->useSSL);

The 2nd parameter should be true to generate a 100% valid html. It is directly used as a hyperlink in html. Therefore special characters should be escaped.