November 20, 2011 by Dave
My previous post on how to get popular products from WP eCommerce is a little dated and doesn’t actually work too well. (in fact my client updated after being specifically told not to update wp ecommerce. Poor I know but what’r'ya gonna do?)
SO I’ve re-written most of the code and now it can be updated and has all the correct details and should work with variations. See the code below:
Category PHP, Wordpress, WP-eCommerce | Tags: Wp e-commerce popular products plugin,wp ecommerce,wp ecommerce best sellers | 28 Comments
August 24, 2011 by Dave
So my snippet a few posts ago got a LOT of attention which I’m glad for; so I’ve decided I’m going to make it a plugin to make it easier for everyone to use, on a different note I’ll be investing a lot more time into posting code snippets and tutorials on here for you all. Keep coming back.
Category PHP, php developer, Wordpress, WP-eCommerce | Tags: Wp e-commerce popular products plugin,wp ecommerce | No Comments
June 9, 2011 by Dave
So I flat out refuse to pay 40 bucks for a license that does nothing but save you a couple hours time. Don’t be lazy coders!
In a previous post I told you how I got into WP eCommerce to get products by ID.
Now I’m going to show you how to get a product search using the normal WordPress search.
Firstly create a file in your theme folder called loop-search.php
Done that? Great, well done.. Now paste the below code into it
if ( have_posts ( ) )
while ( have_posts ( ) ):
the_post ( )?>
<a class="entry-title" href="">
<?php the_title ( )?>
<a class="product-thumb-price" href="">
<img class="product_search_thumb" src="" alt="" />
#Echo a snippet of the content/description
echo substr( get_the_content ( ), 0, 400 )
<a class="product-search-more-link" href="">[...]
<?php echo wpsc_the_product_price ( )?>
<?php echo wpsc_add_to_cart_button ( get_the_ID ( ) )?>
Tada! Product search, that’s probably broken for actual wordpress post searches… But its a work in progress. Only works in WP eCommerce 3.8+ as well so no bitching it doesn’t work, pull our finger out and dig/mess around
Category php developer, Wordpress, WP-eCommerce | Tags: wordpress,wp ecommerce free product search,wp ecommerce product by id | 15 Comments