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

Empty cart keeps shipping amount

Started by restodo, April 11, 2014, 03:34:18 AM

Previous topic - Next topic

restodo

Hi,

I'm on VM 2.6.0 and I'm using Standard Shipping plugin.

For example I have:

Shipment 1 cost  USD 38
Shipment 2 cost  USD 45
Shipment 3 cost  USD 100

If I remove the products from my cart and one of the shipments was selected, when the site say that my cart is empty the amount it isn't.

If I choose for example Shipment 2, USD 45 will be added to my cart.
When I remove the products in cart, the amount in cart stills USD 45.


Could you tell me where can I check to tell the code to clear Shipment Plugin?


Regards.

restodo


JoomTut

you can try to disable cache (Joomla! cache and 3rd party extension), use other web browser,...
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

AH

it is not a cash or browser issue, it is to do with VM not clearing the session variable for shipping, when there are no products in the cart
Regards
A

Joomla 4.4.5
php 8.1

restodo

Quote from: Hutson on April 20, 2014, 16:45:26 PM
it is not a cash or browser issue, it is to do with VM not clearing the session variable for shipping, when there are no products in the cart

Yes, I'm thinking on something like that but I don't know how can I solve it.

Do you know?

JoomTut

#5
I don't think this is a bug of VM. But you can use this code if you want to hide the shipment cost when no product in cart:
Apply for VM 2.6
File to edit: components/com_virtuemart/views/cart/tmpl/default_pricelist.php (please creating template override)
Line 366:
<td align="right"><?php if($prow->product_name) echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment'''$this->cart->pricesUnformatted['salesPriceShipment'], FALSE); ?> </td>
Line 411:
<td align="right"><div class="bold"><?php if($prow->product_name) echo $this->currencyDisplay->createPriceDiv ('billTotal'''$this->cart->pricesUnformatted['billTotal'], FALSE); ?></div></td>
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

AH

Yes Joomtut

You can create the override as you suggested but the issue is still that the variable $this->cart->pricesUnformatted['salesPriceShipment']

Is left populated when there are no products in the cart

It should be raised as a bug or "unwanted feature"
Regards
A

Joomla 4.4.5
php 8.1

restodo

Quote from: Hutson on April 21, 2014, 11:50:13 AM
Yes Joomtut

You can create the override as you suggested but the issue is still that the variable $this->cart->pricesUnformatted['salesPriceShipment']

Is left populated when there are no products in the cart

It should be raised as a bug or "unwanted feature"

Yes, I think the same to you. I hope some admin o developer read this post.


JoomTut

#8
Have you tried doing it? Are you doing the right thing?

As I said, you can use this code if you want to hide the shipment cost  when no product in cart.

In this code, I use IF conditions to recognize when there are products in your shopping cart:

if($prow->product_name)

You can apply it to wherever you want, not only the shipment cost.
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

kreativa

Hi,
I also had this problem.
In shipment methods the Lowest Weight should be more then 0 g

JestaBlunt

add 1 to the minimal count of products of the shipping type (in german its "Mindestanzahl von Produkten")...works like a charm

GJC Web Design

can confirm JestaBlunt solution is the correct one -- just choose a minimum of 1 product in your shipping method
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