User : crypticsoft
|Pinnacle Cart PDO MySQL : Product Class||crypticsoft||PHP||mysql||
While the Pinnacle Cart API can handle some of this, I found it easier to query the database directly. This PCProduct class was developed for integrating Pinnacle Cart with WordPress with the following methods: - getproduct($id) - getproductbyproductid($id) - getproductbox($row) - gettop($cid,$cnt,$side) - getproductsbycategory($cid) - getcategories($parent,$order,$level) - get_recent($limit)
You will need to edit the following methods to match your cart paths / database settings: - cartpath() - carturi() - get_connection() -- This is the PDO connection, fill in the host, dbname, user, password - getProductUrl() -- Check the SEO settings, I'm using the 3.7 custom URL: %CategoryName%/%ProductTitle%/
|REST API products and categories from pinnacleCart||crypticsoft||PHP||restclient||
This is a useful class which utilizes Phil Sturgeon's helpful restclient (http://getsparks.org/packages/restclient/versions/HEAD/show). Reference the URL attached for PinnacleCart API docs.
Example request URLs to get products and categories:Get product by product_id (XX##) or keyword(s)
~/products/getProducts/search/10/oj70/oj77/oj75Recently added products by CategoryID (/cID/batchSize)
~/products/getProductsByCategory/92/10Recently added product images by CategoryID (/cID/batchSize)
-- This was to remove the 'Description' key/value for slide shows ~/products/getProductImagesByCategory/92/10Recently added products by limit
~/products/getRecentlyAdded/20Get all categories
|August 18, 2012|
|Limit WordPress the_content by words||crypticsoft||PHP||post||
I need this function all too often and figured I'd share it. Limit the_content() by word limit by using built in WordPress functions.
|June 22, 2012|
|WordPress Portfolio Custom Post Type Filtering||crypticsoft||PHP||wordpress||
Here is a quick example on how to generate your own portfolio with filtering based on a taxonomy (in this case 'Solutions').
|June 19, 2012|
|RSS Feed Caching||crypticsoft||PHP||rss||
Note: This also uses a flat file to cache the results, be sure to also upload the 'rss_cache.txt' file.
|June 8, 2012|
Include twitter bootstrap, as of this writing is at v2.0.4 and the following JS / html to your page and also uses Glyphicons.
|June 3, 2012|
|Meteor Slides : WordPress Plugin : Adding Description field||crypticsoft||PHP||plugin||
For when you really just need a short description field along with a title for your slideshows. Just drop this into the functions.php and meteor-slideshow.php in the theme folder.
|May 30, 2012|
|Parse PHP files into ASP extensions||crypticsoft||PHP||php||
For those cases where you want to code in PHP but need to deploy to ASP. It doesn't account for php logic but only converts the php include() statements into SSI includes. Could be useful for converting basic websites from php to asp, rare but it happens :)
|May 26, 2012|
|WordPress Links Manager - Display a random link from a category||crypticsoft||PHP||manager||
Sometimes you just want a random link to display and outside of the default format, this works perfectly and removes all default html (list items / headings).
|April 11, 2012|
|WordPress Query Taxonomy by ID||crypticsoft||PHP||post||
When you create a custom post type and need to query by ID then you can pass in the 'field' and the 'terms' with the ID for that post type.
|March 1, 2012|
|Styled Select Menus||crypticsoft||CSS||menus||
For those times when you just need a quickly styled select menu with css.
|January 20, 2012|
|Cache AJAX Response||crypticsoft||jQuery||deferred||
Basically, if the value has already been requested once before it's returned immediately from the cache. Otherwise, an AJAX request fetches the data and adds it to the cache. The $.when/.then doesn't care about any of this; all you need to be concerned about is using the response, which is passed to the .then() handler in both cases.
Deferreds are perfect for when the task may or may not operate asynchronously, and you want to abstract that condition out of the code.
|March 28, 2011|
|Deferred with $.when help and template example||crypticsoft||jQuery||deferred||March 28, 2011|
|Smarty Template : Multiple Column Loop||crypticsoft||Smarty||tpl||
Take array and create multiple columns, define divisible by value ($divis) from total results then use modulus within the loop. This example shows multiple columns for unordered list items.
|March 10, 2011|
Note: replace "USERNAME" with your own twitter username. This is using cycle plugin with easing which is applied after the tweets are populated.
|March 6, 2011|