Your cart is empty
Hi, guys, please see the post below, I think it will help you.
Thanks for the input, however the link you sent was not related to my question. I’m trying to remove the text “Your cart is empty”. I tried the cart shortcode for this, unfortunately the links that show up for the cart run together so it’s confusing to the consumer. It appears to be a formatting issue when using cart shortcode.
up to version 1.1.3 you had to modify the file views/cart-sidebar.php
with version 1.1.4 (and onward) I guess you have to modify your language file in the language folder
Hi Paolo, Thanks for the input. Hacking the php file will work, however I lose the change with each program update. Hoping for a solution that won’t change with each update.
you all right.
could be a new feature for the next release
Chris, Paolo.valier and xxxdxxxd….the answer to your question is very simple…I’ a little surprised these other professionals were not able to help you??
Step 1: Extract “wpsc-cart_widget.php” from your plugin folders..this php folder controls the “Your Shopping Cart is Empty” verbiage. Make sure you don’t edit this original…make a copy of it and make edits to the copy.
Step 2: Scroll down to line 81 or therabouts and you’ll see the verbiage that needs to be edited in a very light grey color. Make sure you leave the quotes exactly where they’re at and only edit between the quotes.
Step 3: Upload this back into your Get Shopped plugin (wp e-commerce) and then test the chopping cart widget and you’ll see that the edited portion should show now.
Step 4: Not finished..in order for this particular form to not be erased when you update your Get Shopped plugin again….go to the admin section of the plugin and check off within the “presentations” tab in admin….this is where you move specific files to your “theme” location and they’ll be now integrated with your theme folders and that location…a plugin update will “never” change these settings. Trust me.
Thanks again, RC
I’m interested in the answer to this, too.. (for strings like: “Your receipt will be on the next page and also emailed to you.”)
I think rcano is on the right track, but might be a little lost – i reckon thats a reference to WP-eCommerce, rather than Cart66 🙂
I believe that due to the translations in Cart66, you shouldn’t change the text here: _e( ‘Your cart is empty.’ , ‘cart66’ ); (cart.php line 424) but rather create a po/mo translation file. Correct me if I’m wrong but I think that changing the text in the function above would break translation for every other language!
The translation template is Cart66.pot, so could I just create a new PO file from it called cart66-en_AU.po? If I were lucky, I could just alter the entries I wanted to change, and leave the rest as default… is that lazy logic?
Would this work if I have the site’s language set to en_AU in wp-config.php?
Here’s another approach:
change-labels-on-nickname-and-biographical-info that could be adapted…
ugh.. maybe its not so important 🙂
Actually you have the correct php file, cart.php line 424 and editing whats between the quotes will not crash your Cart66…I’ve customized a Cart 66 site in the past.
However, changing this “should not” change any language…the _e is the language for english so you’re only changing the English ‘Your cart is empty.’ and that line only serves as the “message” it has nothing to do with the functionality…in other words you can put “My cat is black” and it won’t affect the functionality.
Now, if you have a different language….you will have to insure that you’re using proper english so that it can in fact translate the new line or sentence.
My suggestion…test it on a demo site…just make sure you back it up before you tinker with it.
Thanks again and good luck,
- The topic ‘Your cart is empty’ is closed to new replies.