Page 1 of 1

View Cart module - Mini Mode

Posted: 28 Jul 2017, 15:51
by nzrunner
I love the "mini mode" that is available when I put the View Cart module in the Specific Right Top position using the Phoca Duka template.

Is that mini-mode available when I use a template from another developer?

Re: View Cart module - Mini Mode

Posted: 29 Jul 2017, 01:21
by Jan
Hi, you can copy the output (default.php) of module from Phoca Duka template:
templates\phoca_duka\html\mod_phocacart_cart\default.php (mod_phocacart_compare, mod_phocacart_wishlist) to such external template - to folder html.

Here:
templates\phoca_duka\themes\main\theme.css you can copy the CSS for e.g. horizontal displaying of the icons plus the hover effect:

.ph-cart-module-box
.ph-cart-dropdown
.ph-cart-count-sup

Re: View Cart module - Mini Mode

Posted: 31 Jul 2017, 13:58
by nzrunner
Thanks!

I have it configured, sort of. I haven't got all the CSS correct as it is only displaying correctly on pages from PhocaCart. It doesn't display the Cart/WishList/Compare images when I am on a page that is not from PhocaCart.

But it's a good start :-)

Re: View Cart module - Mini Mode

Posted: 01 Aug 2017, 17:24
by Jan
So seems like the icons from bootstrap were not loaded :idea:

Jan

Re: View Cart module - Mini Mode

Posted: 02 Aug 2017, 00:11
by nzrunner
That's correct. And the hover is not working anywhere :-(

Re: View Cart module - Mini Mode

Posted: 03 Aug 2017, 17:35
by Jan
The hover is made by component, are the class names and IDs of the items in the module output the same like they are in the Duka template, the hover is made by jquery loaded by the component.
Try to add this code to the module:

This is only to test, add this code to: modules\mod_phocacart_cart\mod_phocacart_cart.php

Code: Select all

$p['load_component_media']			= 1;
if ($p['load_component_media'] == 1) {
	$media = new PhocacartRenderMedia();
	$media->loadBootstrap();
}
Jan

Re: View Cart module - Mini Mode

Posted: 05 Aug 2017, 01:00
by nzrunner
No luck.

I suspect it is a jquery conflict. The template I am using is from Yootheme. Even though it is a bootstrap template, they do no use the Glyph icons but their own icon classes using Font Awesome. I have solved that easily with a template override, changing your glyph classes to their icon classes.

However the hover effect does not work, and to make it more interesting, if I am on a non-phocacart page, I can click on the cart module and it will show the cart. If I am on a phocacart page, clicking on the cart icon gives me nothing.

Happy to PM you the website to have a look at if it helps.

Re: View Cart module - Mini Mode

Posted: 08 Aug 2017, 14:02
by Jan
Hi, yes, just send me the link to PM, so I can take a look at it (not sure if I will find something, because when there are javascript conflicts, it is hard to debug, but I will try).
Thank you, Jan

Re: View Cart module - Mini Mode

Posted: 06 Sep 2017, 16:32
by Jan
Hi, in version 3.0.1 of the module, it is possible to load the media (css, javascript) from the component, so the same media will be loaded even the component is not active (e.g. displayed module on different than Phoca Cart component site)
https://www.phoca.cz/download/category/ ... art-module

Jan