We believe that open source projects need to be extensible for people to participate and contribute. On that understanding we have included a range of hooks and filters for developers to use when developing their own WP e-Commerce modules. These hooks and filters are available in the 3.7 + branch of WP e-Commerce.
Filters
wpsc_filter_file
Use this for filtering uploaded files, is useful for wordpress MU where you might not want people uploading executables
wpsc_alter_database_template
Use this to add new tables to the database template
wpsc_theme_folder
Use this to override the selected e-commerce theme
wpsc_transaction_result_content
Adds stuff to the transaction results page for each item, best used in combination with the wpsc_transaction_result_cart_item action
Hooks
wpsc_alternate_cart_html
Used as part of dropshop, allows doing extra stuff as part of the AJAX code executed when things are added to or removed from the cart
wpsc_edit_product
Runs when a product is added or edited, has the product ID passed to it
wpsc_delete_product
Runs when a product is deleted, has the product ID passed to it
wpsc_enqueue_user_script_and_css
For adding further user end CSS and JavaScript
wpsc_gold_module_activation
For activating gold modules
wpsc_gold_module_activation_forms
For adding the forms for the activation codes for the gold modules
wpsc_loop_start
Start of wpsc loop
wpsc_loop_end
End of wpsc loop
wpsc_top_of_products_page
Top of the product page, used to stick in live search
wpsc_product_addons
Used to place additional content into the product HTML
wpsc_admin_pre_activity
Needs documentation
wpsc_admin_post_activity
Needs documentation
wpsc_before_shipping_of_shopping_cart
Runs before calculating the shipping of the shopping cart
wpsc_transaction_result_cart_item
Runs for each cart item that is being saved to the transaction results
wpsc_submit_checkout
Runs when the checkout is submitted
15 Comments
great :-)
Cool, looking forward to making good use of these…
Hey, that sounds incredible !!
Thanks a lot!
One question:
could you maybe state one or two sentences on the wpsc_admin_pre/post_activiy?
Also: might there be a chance to use these in altering the appearance of your “packing slip” or will I still have to change your code?
(I must be able to print an invoice directly from WPSC – my simple approach used the packing-slip print function… but now I have the update-problems coming up…;-)
Wonderful!!
I have a few questions and suggestions:
In terms of the Gold Cart shop, are the prices listed a one time fee or a license for a specific period?
It would be great if there was a pricing option for an individual building several e-commerce sites for a specific number of clients
I cannot get Intense Debate to work, what is the format of the IntenseDebate Account ID that I’m supposed to enter in the presentation settings page?
Lastly, it would be great if the widgets had more customizability e.g. options for showing/not showing thumbnails, descriptions, etc
Thanks for producing a great plugin!
is anyone having problems with the buy now buttons for google checkout. After I upgraded they went missing and I have tried everything to put them back in. Help please. peter@tampaempire.com
Do you folks have contact details anywhere on your site? How do you expect people to contact you?!
How about a mention of whether your plugin works for WP2.8.2? Can’t find that anywhere either.
Geez your website is impossible to use! Just a bunch of geeks without concern for your customer’s ability to actually use your stuff.
You’re close but no cigar. Actually we’re pretty awesome geeks that love WordPress and WP e-Commerce. And we love our customers and for that mater anybody that has the simple mental faculties required to ask. That isnt such a bad thing though?
So joe. Here’s the low down – because WordPress 2.8.2 only included a few security patches we figured it is probably okay not to post about it. What it means is that your WordPress site is more secure and that your e-commerce Plugin is exactly the same as before. Rest assured though it does work and it is tested.
We expect people to contact us by posting comments in the blog and by leaving messages in the forum. I usually get over 30 emails per day from people that I’ve never met before so it can’t be that hard.
People also leave us messages via Twitter. Or linked in. Or many other ways. I’m sorry its so hard for you.
Classy reply there Dan, well done.
I’ll buy some upgrades once I’m using the plugin on a live site.
Hi, I’m still quite new to WP ecommerce, client requested WP for the project, so I have to do some serious customizing. So far I’ve changed the core files, but using a plugin API would be preferable, of course. How would I use these hooks? In a WP plugin? Where are WP-ecommerce plugins/modules supposed to go in the file system? Is there any documentation on these hooks and their usage, this seems pretty new, after all… Grateful for any help! Thanks!
Hello,
I had some of the same questions as Joerg re: packing slip customization. Which files controls this page in the admin? I am a pretty good PHP developer and have been unable to figure out. Please advise.
I really love this plugin. You guys saved me a ton of headache with trying to go with a solution that was written for eCommerce (eg Magento / ZenCart). I’ve found your plugin just as powerful enough to rival with them, and more importantly, farrr easier to customize / deploy. We were able to complete a client’s eCommerce store within 2 days because of this.
Thanks!
Is there a hook for when the payment is confirmed kind of like “Transaction Successful”?
It would be good if there was a hook for that cause then we could do some custom processing with the payment data.
you need to handle the transaction success/fail in your payment module
The hooks are great. wpsc_enqueue_user_script_and_css is very nice as well. It would be helpful to add “before” and “after” to a lot of the wp-e-commerce functions. That way even the code could be changed without changing the original code.
E.g. Start Output buffer on the before hook, store function code to a variable, manipulate with str_replace/preg_replace, then on the “after” hook, eval() the code variable…
The other nice thing to add would be (since this is very jQuery heavy, is to add “hooks” for javascript.
For example: wp-e-commerce.js:
jQuery(”form.product_form”).submit(function()
It would be nice right before the return false; we could tie in our own javascript to do something like window.location.href = ‘/checkoutpage/’; that way we could use it for event registration and just change the language file.
Making this plugin extend-able was the smartest thing you guys ever did. Which is why our company is not competing with Instinct. :)
Heres a wee post I made on how to extend wp-e-commerce using modules.
http://www.screamingcodemonkey.com/2010/01/wpsc-module-skeleton/
Hope you find it useful,
best
Jeff
How do it edit the “transaction result” message which appears on the screen and in the customers email?
This was the top result in google for “edit transaction result message in wp e commerce”