Display product price in shopping cart link?

General ShopSite user discussion

Display product price in shopping cart link?

Postby harrin » Mon Jan 03, 2011 12:02 am

So, this gets into a question maybe a tad too technical for me, but i'm trying to do this for simplicity sake, as this feature will help the website i'm working on greatly.

At the moment, every shopping cart link on my site is a manual entry of the price, and then the hyperlink added onto it.
What i would like to do is use php or javascript to lookup, and display the price from the database file, so that when the prices are updated in the shopping cart, they are basically automatically updated in the website as well.
I am aware what i'm looking for might be impossible without compromising the shopping basket integrity, but if it is doable, i would greatly appreciate knowing how to do that.
Forgot to mention that if possible, I would prefer not to use a custom template inside the ShopSite basket. I would prefer to use iWeb, which is why it might be difficult to impossible.

Thanks in advance for reading at least!
harrin
 
Posts: 2
Joined: Sun Jan 02, 2011 11:56 pm

Re: Display product price in shopping cart link?

Postby robm » Mon Jan 03, 2011 10:09 am

The ShopSite database is in an SQLite format. You could have PHP code that would read this database directly, although it will require PHP to have SQLite support. Also, you want to be careful with live reads of the database, as you can run into locking issues. It may be better to copy the database file to another location and read against that.

If your host uses a shared install of ShopSite, then it may not be possible to access the ShopSite database directly. You could do an XML download of your data, import it into MySQL, and then use PHP to call data from the MySQL database.

We have a MySQL module for our hosted clients that makes integrating PHP with MySQL easy, along with simple function calls:
http://www.lexiconn.com/ecommerce/shopsite/mysql-module.html

HTH.

Rob
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Re: Display product price in shopping cart link?

Postby harrin » Wed Jan 05, 2011 7:53 am

Thanks for the info, Rob, it really did help!

Yeah, my host uses a shared install, and after poking around for hour, it appears my best bet is a custom template, or manual price display. So, it's looking like i will end up having to do price display manually, or come up with my own. Still, I do appreciate your help!

As a project down the road for my site, i may ultimately do what you suggested about having a database file off to the side that the price display php script would work with, but I really just need to get the site up and running for the time being.
harrin
 
Posts: 2
Joined: Sun Jan 02, 2011 11:56 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 72 guests