Order Anywhere & Displaying Product Pricing

General ShopSite user discussion

Order Anywhere & Displaying Product Pricing

Postby ChuckCory » Wed Jul 11, 2012 3:50 pm

After many painful hours of figuring out how to display product prices on a variety of pages NOT next to the Add to Cart buttons, I was able to successfully accomplish the task.

Hopefully so others that want to do this, I just wanted to briefly share the solution.

ShopSite product database is a SQLite3 format (as opposed to MySQL). It is easy to access and doesn't require the same "connect" information as MySQL does.

To connect to the product database uses the following code:
<?php $db = new SQLite3('(full path to database location)/shopsite_db');?>

To display a product price anywhere you want on a page simply use this PHP code:<?php var_export($db->querySingle('SELECT ss_Price FROM ss_Products WHERE ss_SKU = "Your SKU"'));?>

I'm sure there are many other ways to accomplish this by programmers with far more experienced than I have, but I know this works and it's simple and easy.

If this helps anyone not having to go through the same long and tedious process that I did, then it has been worth my time posting my experience.

If you have further questions, I'd be happy to chat with you. :D
ChuckCory
 
Posts: 1
Joined: Wed Jul 11, 2012 3:34 pm

Return to User Forum

Who is online

Users browsing this forum: No registered users and 161 guests