• Resolved misskris

    (@misskris)


    I have three items on my page, set up like this:

    <table>
    <tbody>
    <tr>
    <td>Grapefruit, $20.00/box</td>
    <td>[wp_cart_button name="grapefruit" price="20.00"]</td>
    </tr>
    <tr>
    <td>Oranges, $25.00/box</td>
    <td>[wp_cart_button name="oranges" price="25.00"]</td>
    </tr>
    <tr>
    <td>Mixed, $25.00/box</td>
    <td>[wp_cart_button name="mixed" price="25.00"]</td>
    </tr>
    </tbody>
    </table>
    [show_wp_shopping_cart]

    I can add an item and it shows up in the cart, but if I try to add a second item it replaces the first item in the cart. Also if I try to change the quantity of the item once it is in the cart, it disappears completely. I need to be able to let people pick multiple quantities of multiple items.

    I could have sworn this was working when I first set it up, my site was recently upgraded to 4.6.1, that’s the only difference I can think of. I just updated the plugin to the latest version as well.

    The cart can be seen in action here: https://lwv.corvallis.or.us/grapefruit-sale/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, I just carried out a test in my testing site. I used your table HTML code above and it is working for me. So something you have updated or done to your site that is not allowing more than one items to be added to the cart.

    Do you recall anything different you have done?

    You can carry out the following test. Create a test post and copy the same table code. Don’t publish the post then carry out a test to see if you can add more than one item to the cart. This is just purely for testing purposes. At times some pages or posts for some unknown reason become corrupted.

    Regards

    Thread Starter misskris

    (@misskris)

    Thanks for the quick response. I’ve tried that, copying and pasting to a test page. Then I tried creating all new test items on the test page, and still the same. I’ve also tried turning off different plugins one by one. Other than the site updating (which my host did automatically) I can’t think of anything that has changed, other than adding some posts. Any other troubleshooting suggestions?

    Thread Starter misskris

    (@misskris)

    After some more research I think the problem may be a php session session problem as described here: https://www.tipsandtricks-hq.com/forum/topic/php-session-not-working-correctly
    I’ll have to try contacting the host and see if they can help.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Yep that sounds like what you might be experiencing in your site, a session problem.

    Thread Starter misskris

    (@misskris)

    Problem is that the sessions path isn’t writable. Confirmed it by adding this code to one of my files:

    if (!is_writable(session_save_path())) {
        echo 'Session path "'.session_save_path().'" is not writable for PHP!'; 
    }else echo 'Path writable.';

    Now I just need to wait on my host to get it fixed.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Well done. I am sure you host will fix this issue soon.

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cart only holds one item at a time’ is closed to new replies.