Forum Replies Created
I just tried your link and your cart seems to work fine. (I only added and removed from the cart).
@timheuer, I got it working, but noting being a PHP guru, I feel like it’s a bandage solution. My first post alluded to the fix, however after testing it, I also noticed that the red ‘x’ to delete an item from the cart was also broke, so I had to do a similar fix for that. I have posted the updates I made below, but remember that these may not be the proper fix and it would be better if they are fixed by an official update to the plugin.
In a nutshell I think the problem I am having is a combination of IIS, and permalinks (I cannot get permalinks working with anything other than forcing /index.php?page=). Oh and I also followed the WordPress notes to move my index.php out of the wordpress folder and into the root of the site. So I think that all of these tweaks are playing a role here.
That said, here are the mods I made to wp_shopping_cart.php (change your pageid to be
the pageid for your blog. In my case the products and cart are both on the same page:
Within the block of code beginning on line 222 that starts with $output .= ”
There are two calls to action=””
I modified each to include a reference to index.php?page_id=839 and they look like this: action=”index.php?page_id=839″ Make sure you get the and ” in the right place.
approx line 441:
//$replacement = ‘<object><form method=”post” action=”” style=”display:inline” onsubmit=”return ReadForm(this, true);”>’;
$replacement = ‘<object><form method=”post” action=”index.php?page_id=839″ style=”display:inline” onsubmit=”return ReadForm(this, true);”>’;
Once I made these changes, the cart appears to be working ok. However, Im screwed if I change the page, or add the cart elsewhere.. I will cross that bridge if and when I have to..
Problem is, it is not really working. I think that normally, WordPress handles my site calls to the root at index.php. For example, my About page calls to this: http://www.plastibots.com/?page_id=2 (WP and IIS are fine). But, in your plugin action=”” and calls back to the same page seem to break. Any other thoughts on how to fix this? I dont really want to patch the action reference as it seems more like a bandage solution.