Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: Flexible Cart Problem

Flexible Cart Problem 8 years 10 months ago #12668

Hi again ;-)

A couple of issues with Flexible Cart (the one on the top of the page).

1. Remove product does not work
2. In the checkout page if we press shipping methods or payment methods the cart drop-down gets a black background and again "remove" ("αφαίρεση") does not work.

Please check www.stospiti.gr and let me know if you have any ideas ;)

Thanks a million!

Dennis
The topic has been locked.

Flexible Cart Problem 8 years 10 months ago #12686

Hi,

Actually "remove" button works, it successfully deletes the product. But it just doesn't update the Dropdown Box after deleting the product. So, it causes little confusion.

I don't know what triggers this AJAX to not work on your website. But here is the patch you can apply. It will be much easier approach to your case.

Open this PHP file:
/modules/mod_flexible_cart/tmpl/default.php

find this Javascript function
function remove_product_cart(elm) {
	var cart_id=elm.getChildren('span').get('text');
	jQuery('.vmCartModule').find('.show_cart').append('<div class="loading"> </div>');	
	if(document.id('is_opc')) {
	    remove_product(elm.getChildren('span').get('text'));
	} else {
	new Request.HTML({
		'url':'index.php?option=com_virtuemart&view=cart&task=delete',
		'method':'post',
		'data':'cart_virtuemart_product_id='+cart_id,
		'evalScripts':false,
		'onSuccess':function(tree,elms,html,js) {
			//jQuery('.vmCartModule').productUpdate();
			mod=jQuery('.vmCartModule');
			jQuery.getJSON(vmSiteurl+'index.php?option=com_virtuemart&nosef=1&view=cart&task=viewJS&format=json'+vmLang,
				function(datas, textStatus) {
					if (datas.totalProduct >0) {
						mod.find('.vm_cart_products').html('');
						jQuery.each(datas.products, function(key, val) {
							jQuery('#hiddencontainer .container').clone().appendTo('.vmCartModule .vm_cart_products');
							jQuery.each(val, function(key, val) {
								if (jQuery('#hiddencontainer .container .'+key)) mod.find('.vm_cart_products .'+key+':last').html(val) ;
							});
						});
						mod.find('.total').html(datas.billTotal);
						mod.find('.show_cart').html(datas.cart_show);
						mod.find('#product_list')
					} else {
						mod.find('.vm_cart_products').html('<div class="cartEmpty"><?php echo JText::_('COM_VIRTUEMART_CART_NO_PRODUCT'); ?></div>');
						mod.find('.show_cart').html('');
						mod.find('.total').html('<span class="flexibleLabel"><?php echo JText::_('COM_VIRTUEMART_CART_OVERVIEW') ?></span><span class="flexibleNumber">0</span>');
						//mod.find('.total').html(datas.billTotal);
					}
					mod.find('.total_products').html(datas.totalProductTxt);
				}
			);
		}
	}).send();
	}
}

and replace it with this:
function remove_product_cart(elm) {
	var product_id=elm.getChildren('span').get('text');
	window.open(vmSiteurl+'index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id='+ product_id +'&lang=el');	
}

This should delete the product from cart and load the Shopping Cart page. So, there won't be any confusion.

Regards.
The topic has been locked.

Flexible Cart Problem 8 years 10 months ago #12699

Thanks for your prompt response.

1. It does work but it opens up a new page instead of doing it in the same page. I reverted it back to the original so that we won't lose functionality since the store is live.
2. The top cart gets a black overlay when we press shipping or payment methods.

Can you please take another look and let me know?

Thanks!

Dennis
The topic has been locked.

Flexible Cart Problem 8 years 9 months ago #12718

Hi,

If you inject this linen below instead, the link will be open within the same browser
function remove_product_cart(elm) {
	var product_id=elm.getChildren('span').get('text');
	window.open(vmSiteurl+'index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id='+ product_id +'&lang=el', '_self');	
}

to fix the second problem, open this CSS file:
www.stospiti.gr/modules/mod_flexible_cart/media/theme2.css

1- find this rule:
#product_list {
	position: absolute;
	z-index: 999;
	min-height: 20px;
	padding: 10px;
 border:8px solid #eee;
	-webkit-box-shadow:  0px 0px 2px 0px rgba(0, 0, 0, 0.5);
    		box-shadow:  0px 0px 2px 0px rgba(0, 0, 0, 0.5);
			width:400px;
		background-color:#fff;
		color:#000;
}

and replace it with this:
div#product_list {
	position: absolute;
	z-index: 999;
	min-height: 20px;
	padding: 10px;
 border:8px solid #eee;
	-webkit-box-shadow:  0px 0px 2px 0px rgba(0, 0, 0, 0.5);
    		box-shadow:  0px 0px 2px 0px rgba(0, 0, 0, 0.5);
			width:250px;
		background-color:#fff;
		color:#000;
right:0;
left:auto;
}

Everything will be good to go.


If you like CleanMart and satisfied with the support you have received, please "write a review" on:
www.flexiblewebdesign.com/Virtuemart-2-Templates/CleanMart

Write couple of sentences to share your experience with the support team.
Just 2-3 sentences would be enough ;) It might sound simple to you, but it is extremely important. Potential customers care about product reviews very much.

Thanks in advance!

Regards,
Support
The topic has been locked.

Flexible Cart Problem 8 years 9 months ago #12808

Hi,

Thanks once more for your great support!

I just posted a review about this on your site.

Dennis
The topic has been locked.

Flexible Cart Problem 8 years 8 months ago #12858

I am glad everything is sorted out.

Case solved. topic is closed.

regards
The topic has been locked.
Time to create page: 0.088 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo