[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-05-13
12
Medium Priority
?
624 Views
Last Modified: 2012-08-13
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.
0
Comment
Question by:SpencerKarnovski
  • 9
  • 3
12 Comments
 
LVL 10

Expert Comment

by:webwyzsystems
ID: 35755927
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
 

Author Comment

by:SpencerKarnovski
ID: 35755967
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
 

Author Comment

by:SpencerKarnovski
ID: 35755971
BTW - all products, if you had not guessed are in the supplements section.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:SpencerKarnovski
ID: 35755987
Each item has a separate SKU obviously.
0
 

Author Comment

by:SpencerKarnovski
ID: 35756075
Another issue, you hit the back button and it clears the cart of all products. ><
0
 
LVL 10

Expert Comment

by:webwyzsystems
ID: 35756300
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
 

Author Comment

by:SpencerKarnovski
ID: 35756397
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
 
LVL 10

Accepted Solution

by:
webwyzsystems earned 1500 total points
ID: 35756475
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
 

Author Comment

by:SpencerKarnovski
ID: 35756605
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
 

Author Comment

by:SpencerKarnovski
ID: 35756673
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
 

Author Comment

by:SpencerKarnovski
ID: 35756725
Adding the <div class="vmCartModule"><jdoc:include type="modules" name="cart" style="xhtml" /></div> too the index.php page makes no difference.
0
 

Author Closing Comment

by:SpencerKarnovski
ID: 35759823
Ok.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Suggested Courses
Course of the Month20 days, 5 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question