Virtuemart not adding products, it sometimes removes (overwrites?) existing products from cart.

Hi.

This is very strange and very frustrating.  I'm building an e-commerce site.  I'm not a PHP programmer, but I can normally figure out what is wrong as long as there is some indication of the problem. Well, not this time.

Virteumart is being very unstable.  When I'm clicking on the add to cart button, products are sometimes being added, sometimes they overwrite existing products, and I cannot seem to add more than 7 products to my mini cart.  When I do it just deletes the previous item.

This is very strange and I cannot for the life of me figure out why.

1) Have you got any idea why this is happening - I cannot find no info through searching.
2) Can I PM the link to my site, and have you try adding products to the cart - you obviously do not need to register by just adding items to the cart.

Thanks.
SpencerKarnovskiAsked:
Who is Participating?
 
webwyzsystemsConnect With a Mentor Commented:
You might be better off to <IFRAME> that little bit inside the <DIV>. Every time a page loads, the <IFRAME> would be refreshed...even when you go back.

The <IFRAME> source would be a file that only contains the code to show the cart contents.

I cannot replicate the incorrect item thing, or the 7 item limit. I wonder if it's all related to the refresh after a back?
0
 
webwyzsystemsCommented:
Without seeing anything...I suspect the issues might be one of these:

1. There is a programmatic error around the identification of the items. Meaning...perhaps you have 4 items numbered 1, 2, 3, 4 in your cart. Your page displays other items, but they have the SAME item number 1,2,3,4. So...if you go to add Product 4, and a Product 4 already exists in the cart...it is over-written.

2. The mini-cart might only support up to 7 items.

Post the link for more help.
0
 
SpencerKarnovskiAuthor Commented:
Hello WebSys

You might be onto something there.  I have the same products in multiple categories.  For example, I have the main cat supplements, which has 90 products in.  I have then split this into 3-sub cats as well. So the user can either view all the products in the supplements section - or break these down into proteins and mass gainers, minerals & vitamins etc..

Anyway, have a look;

www.shop.trainatbulks.com

Thanks for your help.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
SpencerKarnovskiAuthor Commented:
BTW - all products, if you had not guessed are in the supplements section.
0
 
SpencerKarnovskiAuthor Commented:
Each item has a separate SKU obviously.
0
 
SpencerKarnovskiAuthor Commented:
Another issue, you hit the back button and it clears the cart of all products. ><
0
 
webwyzsystemsCommented:
The back button isn't actually clearing the cart...it's clearing the display of the cart.

You need to make sure that the cart refreshes itself. Notice that if you go back, then do a refresh - the cart is restored. You will need to force a refresh every time a user goes back.
Look at this tag in your code: <div class="vmCartModule">
This DIV needs to be reloaded every time. You might need to rethink your structure here a bit.

Still looking at the other thing...
0
 
SpencerKarnovskiAuthor Commented:
Hi.

Thanks for your help here.  I'm using ..

vmCartModule {
  position: absolute;
   top: 10px;
   right: 10px;
}

..in my template CSS to position the mini cart in the top right hand corner.  How would one force a refresh on this?
Thanks indeed.

0
 
SpencerKarnovskiAuthor Commented:
Hi Web,
Thanks for your help here.  I will try to implement the Iframe - will need some help, but will ask in another question.

Can I ask one thing - lol - where is the <div class="vmCartModule">  code located.  It should be on the index.php page of my template, but its not. I cannot find it.  I'm not a programmer, but I assume its the index page that gets refreshed when hitting back?   Do all sites refresh the pages when a user hits the back button?

And I do not think the refresh is related to the mini cart issue.  Like I said, totally random. I have had others try it, and it has happened to them.  

0
 
SpencerKarnovskiAuthor Commented:
I have added the <div class="vmCartModule"><jdoc:include type="modules" name="cart" style="xhtml" /></div>  to the index.php page of my CSS template.  Should this not refresh the module each time the index page refreshes - assuming the index.page that reloads when the back button is pressed.

Thanks
0
 
SpencerKarnovskiAuthor Commented:
Adding the <div class="vmCartModule"><jdoc:include type="modules" name="cart" style="xhtml" /></div> too the index.php page makes no difference.
0
 
SpencerKarnovskiAuthor Commented:
Ok.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.