Shopping Cart and Membership issue

Hello WPMU Dev Support,

On http://www.flout.co I have been testing the shopping cart functionality in conjuction with GridMarket Theme.

When I add something to the cart via one og the Add Cart buttons the following:
1) It seems to be added to the cart but the number of items in the header remains zero
2) As I add more items the header total is not correct and at times shows zero
3) When I view the shopping cart from the header it shows all items added
4) When I use the menu Store -> Shopping Cart it only comes up if the item total in the header is greater than zero, also it does not show all the items that should be in the shopping cart
i.e. Though I have added 4 items to the shopping cart the header only shows 1 and the Shopping Cart page will only show one

Also, I do not want anyone proceeding to checkout without having logged in or registered first.

Really hoping this is something simple and I have missed setting something up.

Can you please advise.

Kind regards,
Yusef

  • Kimberly

    Yusef,

    Hi and thanks for using WPMUdev forums!

    I've checked out the error and the first thing I'd suggest checking is to see if there is a plugin conflict somewhere. Do you have any other plugins running? Could you perhaps try with marketpress and Gridmarket alone to see if the issue still happens?

    Also, are you employing any sort of caching? And are you using the latest versions of both the plugin and theme?

    Does your server use anything for caching?

    Looking forward to helping :slight_smile:

    Best,

    Kimberly

  • mroracle

    Hi Kimberly,

    I am developing this website under two domains:

    1) Flout.co which has lots of plugins prior to starting the development
    2) Sort.co which started with no plugins or themes and is built bottom up

    With regards to caching, I have my own server and the caching is built bottom up from the server to the websites, Varnish Cache is used on the server with memcache enabled to speed up database queries and the plugins WP Minify and W3 Total Cache are used along with a CDN service from Max/CDN.

    The above cache architecture has proved very robust across many of my websites, is also extremely fast.

    I will revert to Sort.co and build the website bottom up and see if the problem is recurs and let you know.

    Kind regards,
    Yusef

  • mroracle

    Hello Kimberly,

    I have now set up a fresh install on the Sort.co domain, this has the following plugins installed:

    1) MarketPress
    2) FrameMarket/GridMarket
    3) Pretty Link Lite
    4) WPMU Notification
    5) WP Show IDs

    The only caching enabled here is the Varnish Cache on the server which should have no effect on any plugin.

    This is effectively MarketPress and GridMarket being used alone and the issues with the shopping cart are still there.

    Is a cache plugin required e.g. W3 Total Cache to ensure all caches are refreshed automatically?

    Await your guidance before I proceed further.

    Kind regards,
    Yusef

  • mroracle

    Hello WPMU Dev Support,

    I have gone through the server cache, memcache and everything cache on the Flout.co and Sort.co websites.

    Have also setup Sort.co with only the MarketPress/GridMarket installed.

    Flout.co has the W3TC plugin installed and I have verified it is using the memcache on the server.

    I simply cannot get the MarketPress shopping cart working as expected.

    This is getting pretty urgent to resolve now.

    I am very happy to provide you with admin access to the websites and you can investigate for yourself.

    Kind regards,
    Yusef

  • mroracle

    Hi Kimberly,

    Apologies if I have not been clear enough in my explanations.

    Firstly, all my work is individual websites, Multi-site is not being used, Flout.co and Sort.co are completely separate installations i.e. they have their own MySQL database, own directory, DO NOT HAVE Multi-Site switched on etc, the only thing they share is the same server.

    On the server Varnish cache is installed but this really should not interfere with the MarketPress plugin, if anything it would be greatly helping it.

    The website Sort.co is a fresh Wordpress installation, has the minimum plugins which you have recommended:
    1) MarketPress
    2) FrameMarket/GridMarket
    3) Pretty Link Lite
    4) WPMU Notification
    5) WP Show IDs

    There are no other plugins, absolutely no W3TC on Sort.co and Multi-Site IS NOT switched on.

    The MarketPress cart is simply not working on Sort.Co and there really is no other plugin that could be interfering with it.

    Perhaps if you provide me an email and I can send you a username/password to login to each website as an administrator and see for yourself.

    I really need to get this resolved.

    Kind regards,
    Yusef

  • mroracle

    Hi Kimberly,

    The MarketPress cart is now very nearly working for:
    1) Sort.co with minimum plugins (No W3TC)
    2) Flout.co with extortionate plugin including W3TC

    Going over what I wrote in my previous emails the cache they had in common was on the server, Varnish cache, this cache was removed and re-installed.

    The MarketPress cart now behaves as expected except for the following:
    1) The items total in the Header does not update when an item is added to the cart
    2) This is for both Sort.co and Flout.co

    When I get the chance in UK evening time, 4 hours from now, I will set Sort.co to be excluded from the Varnish cache, this will verify if it is the Varnish cache or MarketPress itself causing this issue.

    What would help is to know how the cart works with the various caches from database, to server, to browser and page i.e. is the header total being held in the browser or database cache? Must be browser as the customer is not logged on.

    If you are able to provide the cache strategy for MarketPress I will let you know how the header total in Sort.co performs when I have excluded it from the Varnish server cache.

    Kind regards,
    Yusef

  • mroracle

    Hi Kimberly,

    I have had, what I guess is for you an unexpected result, but for me expected, you can see it all for yourself on the following domains:

    For both I was not logged in as a user which ensures the database cache is not required to record the items in the cart, it can only be done via the browser cache.

    SORT.CO
    This has no caching, on the server or any plugin.
    The total in the header does not update when items are added or removed when using the 'Add To Cart' buttons.
    If you refresh the page the total displayed is correct
    If you use the Update Button on the check page it also displays correctly
    If you use the Empty Cart button in the view header of GridMarket it does not set the total back to zero

    FLOUT.CO
    This has Server cache Varnish and W3TC installed
    All options for the Browser cache within W3TC were selected
    Everything works perfectly for the header Total e.g.
    - Use the Add TO Cart button the total is updated and displays correctly
    - Use the Empty cart button on GridMarket and the total sets to zero and displays correctly

    TEST FOR YOURSELF
    I have left both websites up and running, have a play around for yourself.

    CONCLUSION
    Based on the above results
    1) It appears the MarketPress plugin is not administering the Browser cache properly
    - I think it needs to prevent caching of objects after settings have changed.
    2) Work around is to install W3TC and enable all Browser cache options

    Hope that helps,
    Yusef

  • Dean Kaus

    Hello @mroracle
    I just checked out your Flout.co site and added items to the cart, removed them from the cart and each time everything was refreshed properly. I tested the site using firefox and also tested using IE 7. Everything appears to be working up to the actual entering my payment information.

    On your Sort.co site everything seems to work adding and subtracting items from the cart with the exception of the number of items in the cart that appears in the header to the left of your View/Hide Cart Button.
    If i manually refresh the page the it corrects the total items.

    This seems odd to me because if I click on the View cart before I add anything, then add and item it refreshes the cart with the exception of the total items.

    2 things that came to my attention (keep in mind I'm a newbie here) was that in the code for Flout.co (the site that appears to be working you have additional code above your <!DOCTYPE html> statement to apparently support other browsers. in the Sort.co site that is not working properly you do not have this.

    Also on the Sort.co site (site that's not working) you reference a different stylesheet and are using gridmarket/style.css The gridmarket Style.css could be causing the problem with this particular theme.

    I use gridmarket with a different theme and had some display problems. Thanks to @pcwriter he helped me with the correct code to add to my custom css area and I had to mark it !IMPRTANT so it would override the gridmarket in certain areas.

    Hopefully this will help somewhat. Let me know either way if this helps as I'm still learning.

  • mroracle

    Hi Dean,

    Thanks for taking the time to read my post and your feedback is very useful.

    First though let me getting the test scenario correct:

    1) On both Sort.co and Flout.co the FrameMarket/GridMarket theme's are being used, in some of my posts I have mis-typed these as FramePress/GridPress
    2) With regards to your last paragraph, GridMarket is a theme so I am not clear as to how you are using it with another theme

    I need to revise the conclusion of my tests triggered by and also based on the feedback you have provided:
    1) The View Cart total in the header is part of the GridMarket theme not the MarketPress plugin, this is what is not working in Sort.co and is in Flout.co
    2) Sort.co has no cache enabled from server, page, browser or object
    3) Flout.co has all cache enabled including W3TC

    If I ficus just on Flout.co now:
    1) W3TC has settings for the Browser cache
    2) When the header settings are disabled then the total in the GridMarket header total does not update
    3) When the header settings are enabled then the total in the GridMarket header updates

    REVISED CONCLUSION
    Based on my tests and your feedback
    1) It appears the GridMarket theme does not cater for the browser cache correctly
    - I think it needs to prevent caching of objects after settings have changed.
    2) Work around's are:
    - Install W3TC and enable all Browser header settings, advise to enable all Browser settings
    - Get and install the css fix !IMPRTANT from @pcwriter
    3) If the error is with GridMarket theme can this be quickly fixed and a new version released

    Basically, I think we have applied the same fix but in different ways, W3TC has made the changes to the browser caching in my case.

    Happy to say I could be wrong too, all I have done is report back on my testing and what I think is causing the issue in the hope it will lead to a working solution and final fix.

    Again, many thanks for your feedback and would you be kind enough to provide me with details of the css fix you implemented?

    Kind regards,
    Yusef

  • Dean Kaus

    Hello Yusef, @mroracle, Just a reminder I'm a newbie here. Most of the programming I ever did was a long time ago and was limited to x-base and basic language.

    My first thoughts in troubleshooting your sites were to look at the source code (I visit your homepage, then right clicked and then in the drop-down box I select the view source code.) The Flout.co site was working properly so I wanted to compare the differences to see what may be causing the problem. I'm also assuming that these are independent installations but on the same server.

    So looking at the first section of Flout.co (the site that's working) I noticed several differences in the coding and the order that some of the link calls are in. Since the sites look very similar (not sure if your going to be selling the same items just from different sites) I'd look to see how I have the Flout.com site set up and mirror that (IE... same installed plugins etc... and remove or disable any plugins that are not being used in the Flout.co site) This in itself may solve your problems.

    I personally have not used any cach type plugins or such as I've heard that too many times they cause problems. However in your case it looks like it's working for your Flout.co site so maybe it will fix your other site by adding this function.

    What I'd personally try would be to add the following code to your sort.co site. This may be all you need to do to fix things. Not sure exactly how you'd put it there but you being more experienced may know how. On a normal html site I'd know where but I'm really new to the whole WP, Themes and plugins.

    <!--[if lte IE 6]>
    <div id="ie6w_div" style="overflow: hidden; z-index: 1500; left: 0px; top: 0px; height: 34px; width:100%; background-color: rgb(255, 255, 0); font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; color: rgb(0, 0, 0); clear: both; border-bottom: 1px solid rgb(0, 0, 0);">
    <div id="ie6w_icon" style="overflow: hidden; position: absolute; left: 0px; top: 0px; height: 28px; width: 30px; padding: 3px;">
    <img style="width:30px; height:28px;" src="/wp-content/plugins/ie6-warning/img/alert.gif">
    </div>
    <div id="ie6w_text" style="overflow: hidden; position: absolute; left: 36px; top: 0px; height: 28px; width:85%; padding: 3px; text-align: left;">

    </div>
    <div id="ie6w_browsers" style="overflow: hidden; position: absolute; right: 0px; top: 0px; height: 28px; width:15%; padding: 3px;">

    <img style="width:28px; height:28px;" alt="get Firefox!" src="/wp-content/plugins/ie6-warning/img/firefox.gif">


    <img style="width:28px; height:28px;" alt="get Opera!" src="/wp-content/plugins/ie6-warning/img/opera.gif">


    <img style="width:28px; height:28px;" alt="get Chrome!" src="/wp-content/plugins/ie6-warning/img/chrome.gif">


    <img style="width:28px; height:28px;" alt="get Safari!" src="/wp-content/plugins/ie6-warning/img/safari.gif">


    <img style="width:28px; height:28px;" alt="get IE7!" src="/wp-content/plugins/ie6-warning/img/ie.gif">

    </div>
    </div>
    <![endif]-->

    |
    2) With regards to your last paragraph, GridMarket is a theme so I am not clear as to how you are using it with another theme
    |

    Sorry I'm not using the gridmarket theme I'm using the marketpress-grid plugin I believe sarah gooding developed this I'll try to find the post that led me to that plugin.

    I'll look at my CSS to see if that would work but I think it solved the issue for my theme and may not work for your problem.

    Again the first thing I'd try is to see what diffences you have in your setup between the 2 sites and get rid of anything not needed on the site that's not working.

    Then I'd figure out where and how you added that code I pasted above into the site that's not working. I believe that it could also be a solution to why it appears to work on one website and not the other.

    Hopefully that will be the solution and an easy one at that.

    I'll look up the CSS code and try to get that to you tonight (actually it's 3am here)

    Hope this helps!

  • Dean Kaus

    Hello Again @mroracle I checked the CSS that @pcwriter helped me out with and it would apply to your particular issue. The problem I was having was the color of text and the look of my buttons.

    I really hope that by adding the code I pasted above will fix either some or all of the problems. Other than that then I'm sure that my suggestion to duplicate the plugins and theme settings from the flout.co site to your sort.co site will do the trick.

    I pray that you will get this solved quickly.

  • mroracle

    Hi Dean,

    Many thanks for all your help, with regards to editing the code in Wordpress, from the WP Menu:

    Appearance -> Editor

    Will take you to a screen with a window to edit code and on the right all the files with the code to select from, you can view or edit the code from there.

    I do think WPMU Dev have enough detail now to fix this error, so would be good to get a post from Kimberly.

    Kind regards,
    Yusef

  • Dean Kaus

    Hi Yusef,
    No Problem. Thanks for reminding me about being able to edit from within WP. I've been using Microsoft Expression since the color coding makes it easier for this old dude (me) to see what I have going on. Then I FTP it back up to the site.

    Not sure if there is a better editor out there or not.

    I need to learn how to set up a local test site on my computer to test out things before going live. This way I can hopefully learn to write code and possibly develop some customized projects myself.

  • Kimberly

    Yusef,

    Reading through the responses here I would ask the same basic question as Dean...

    What is different between these two sites? If it's just the W3C, then can you employ this and see if it works?

    I have recreated an install with all these plugins you mentioned

    The website Sort.co is a fresh Wordpress installation, has the minimum plugins which you have recommended:
    1) MarketPress
    2) FrameMarket/GridMarket
    3) Pretty Link Lite
    4) WPMU Notification
    5) WP Show IDs

    and am showing no issues. Perhaps you can tell me what you are using in Pretty Link Lite so I can try and replicate?

    In any case, on a clean install you should not be having these issues. All I have left to ask about is the Pretty Link Settings, to see if the conflict is here. I will flag the developer as soon as I hear from you on this.

    Thanks for your patience!

    Kimberly

  • Dean Kaus

    Hi @KimberlyL and @mroracle I was going to try to set up a test site as well (need to learn how to do this) but I ran into a problem myself today that also may lend to a solution here.

    I may have missed if Yusef is running both of these domains from the same server. If he is is are they virtual servers with one being the main host then the other being a sub virtual domain?

    Reason I'm asking is that I have 3 different websites one of which I'm using to test out general look, design, plugins etc...

    3 identical setups and the 3rd using the same theme doesn't allow me to set up marketpress and a few other plugins. I upload the zip file through the dashboard, everything looks normal until I go to activate the plugin. Then I get a white screen and can't get back to the dashboard or anything. If I close the browser I can't even log back in as I only get a blank screen.

    I've even uninstalled everything including WP and started over and still have the same issue. So I'm thinking that there now has to be some sort of hidden file or setting from my hosting company causing the problem.

    Not sure if this could be something that's happening on your other as well

    If I don't get it fixed via my hosting company I may have to start a new thread here to see if anyone else is experiencing this same problem.

  • mroracle

    Kimberly,

    I cannot account for why it is working in your environment, though this should not be surprising.

    Also, Dean has had this problem and he applied the code provided in previous post, which indicates there is an error with the GridMarket theme code updating the header total.

    Let us stick with Sort.co, I have simplified the set up of plugins, it now has only the following:
    1) MarketPress
    2) WPMU Notification
    3) WP Show IDs
    4) FramMarket/GridMarket theme

    The problem is still there, basically whenever an 'Add to Cart' button is clicked the total in the GridMarket header is not updated.

    If you could simply explain how the details of the cart are maintained when a user of the website is not logged on e.g. is it using a cookie and the browser cache or is it saving details to the database?

    I very strongly suspect it is using a cookie and browser cache in which case there is most definitely an error with how Gridmarket theme updating the total i.e. it cannot possibly be a server cache issue.

    All I can offer to move this forward is the username/password to the WP website and you can see all for yourself.

    How would you like to proceed?

    Kind regards,
    Yusef

    PS Dean
    Both web sites are on the same server
    Both are standalone separate WP installations
    I have never had issues with loading plugins
    Best you open a new ticket and thread as it does appear to be a hosting issue

  • mroracle

    Hi Dean,

    Sort.co has been set up to have the error and allow the hosting company and WPMU Dev to track down if the error is with the cache or the code.

    I have the hosting company looking at this and they have asked for it to be left alone so they can feed back on where the caching is occurring.

    The only other people I want looking at the Sort.co website is WPMU Dev so they can ascertain if there is an error with their code or explain why not.

    Thanks for the offer.

    Yusef

  • aecnu

    Greetings Yusef,

    Just checking if this issue was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that's great news.

    If not, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thank you for being a WPMU Dev member!

    Cheers, Joe

  • mroracle

    Hello Joe,

    This issue has been resolved, to summarise what was causing it:

    1) The memory on the server was doubled e.g. 1.5Gb RAM to 3Gb RAM
    2) Latest Wordpress installed
    3) Latest MarketPress installed

    With minimum plugins installed the total in the GridMarket theme worked as expected.

    Guessing the memory was the main factor but the software upgrades probably resolved the browser cache issue.

    Many thanks for yours and everyone else's help resolving this.

    Kind regards,
    Yusef

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.