Pinnacle Cart PDO MySQL : Product Class


/ Published in: PHP
Save to your folder(s)

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:
- get_product($id)
- get_product_by_product_id($id)
- get_product_box($row)
- get_top($cid,$cnt,$side)
- get_products_by_category($cid)
- get_categories($parent,$order,$level)
- get_recent($limit)

You will need to edit the following methods to match your cart paths / database settings:
- cart_path()
- cart_uri()
- 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%/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.