Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

WP Ecommerce Shorcodes not working WordPress

  • REFUNDED

Hi ...

In my WP Ecommerce site - the shortcodes aren't working.

I need to know where you go to create these/update these within WP Ecommerce. The regular, built in shortcodes do not work (ie. [shoppingcart] [productspage] ... etc)

The products page shortcode works with [wpsc_products] but the "checkout" "transaction results" and other shopping cart shortcodes don't work.

The website is here: http://thebodyconnection.ca

The working page is here: http://thebodyconnection.ca/classes/products-page/

The non-working page is here: http://thebodyconnection.ca/registration/checkout.php

So confusing! Please help - thank you!

Answers (3)

2013-09-03

zebra webdesigns answers:

Is the page
http://thebodyconnection.ca/registration/checkout/

or

http://thebodyconnection.ca/registration/checkout.php


Emilia Farrace comments:

The checkout appears in two places, below works as well .. .

If you just add something to the cart, and click checkout - you will see the issue.
Thanks!

http://thebodyconnection.ca/products-page/checkout/


zebra webdesigns comments:

Where you placed the checkout shortcode
within the visual editor or the plain text editor.
try putting it in visual mode /text mode

then see whether it works.
Just an idea, I am not sure.. will digg it further


Emilia Farrace comments:

neither seems to be working ... thank you for continuing to look!!
Emilia


zebra webdesigns comments:

Hello Emilia

I will send my skype Id and come through teamviewer [remote assistance] to help you.

2013-09-03

Eric P. answers:

OK. I just downloaded the [[LINK href="http://wordpress.org/support/plugin/wp-e-commerce"]]WP e-Commerce plugin[[/LINK]] and unzipped it.

I don't see a "[shoppingcart]" shortcode anywhere in the php code for that plugin. I only see 3 shortcodes, [wpsc_products] [buy_now_button] and [showcategories].

I do see an ugly "preg_replace ... [shoppingcart]..." in a function in the file theme.functions.php. That seems to only happen when "in_the_loop()" is true. That usually is not true for single pages or single posts. I'm not sure how you should use that pseudo-shortcode.

Ideally, the author(s) of this plugin should change that over to a real shortcode function, with the "add_shortcode" call to hook a function to process the shortcode.

That's beyond the scope of your offer here. It's something I could probably do, but time and effort would be more than you are offering.


Eric P. comments:

Just a suggestion, you could try commenting out these two lines in your wpsc-includes/theme.functions.php file

if ( ! in_the_loop() )
return $content;

Those are lines 1170 and 1171 in the current version. Change them to
// if ( ! in_the_loop() )
// return $content;

See what happens.


Emilia Farrace comments:

Thanks - I did this and nothing happened ...

I would be willing to obviously give more because of the scope, however, I didn't know the severity of the issue before I posted the question.


Eric P. comments:

I'm not sure.

I do note that the plugin you're using has more "1 star" ratings than it has "5 star" ratings, and more 1 and 2 star ratings combined than it has 3, 4 and 5 star ratings combined.

Those are always warning signs.

Have you considered another shopping cart plugin?


Emilia Farrace comments:

HI --

Yes - this plugin/site was built in 2011 and never had any problems until this last upgrade. I have had problems with it in the past and no longer use it for newer sites we work with.

This issue just came up and downgrading back to older versions hasn't helped this shortcode issue. :(

Thanks for the help.


Eric P. comments:

I'm running out of ideas then. Restore from the backup (database and file system) before your upgrade?

I also see that the plugin you're using has some files (in the wpsc-theme directory) which have to be copied into the current, active theme. Perhaps the upgrade didn't upgrade the files in the current theme, and copying those again will help. It's probably worth trying that.

2013-09-04

Liam Bailey answers:

I have worked on projects modifying the wp-e-commerce plugin and I can confirm it is not very well written. One of the problems I have with it is that the shortcodes are not actual shortcodes as has been mentioned already. What wasn't mentioned is that the so-called psuedo-shortcodes are tied to urls which are stored as options in the database wp-options table. The shortcodes are looked for to be tied to those pages. There are no settings in the admin for this, you have to either honour the pages it expects or change them in the db. When I set up a development site I always have to go in and change them as they contain the full site url. I go into phpmyAdmin and run the query SELECT * FROM `wp_options` WHERE option_name LIKE '%_url' and change them to what you want. You have a url in your question that I presume is for your checkout page (the non-working) so in the db change the checkout_url to http://thebodyconnection.ca/registration/checkout/ or http://thebodyconnection.ca/registration/checkout.php whichever the actual url is.

The plugin creates the pages it needs and puts their url into the database on activation, if you want to change the page a "shortcode" is used on you have to change the url in the db.


Emilia Farrace comments:

I'm really trying to do what you suggested ... but can't figure it out. I'm willing to pay you more for this issue ... can you possibly contact me further regarding this? my email is [email protected] or skype efarrace ...

i'd really appreciate it!!