![]() |
Pull data from PC database in ASP |
Post Reply ![]() |
Author | |
MGatESS ![]() Groupie ![]() ![]() Joined: 12-July-2006 Location: United States Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() Posted: 02-April-2013 at 4:44pm |
Have recently upgraded to PC v4.6.
I want to know if there is a way to grab product record fields to display certain aspects of the product record on another ASP web page outside of the ProductCart folder/pages. I want to pull the data fields from a product record that hold the Name, Short Description, Online Price and Thumbnail Image. I want to use the data in these to display them on my main default.asp page in the root (first page people see when they type in the URL). I wanted to pull it from the PC database the same way that ProductCart pulls it so no matter what type of database (have Access DB now and looking to change to MySQL) or the changes to the product, it will display on my default site page. I made a screenshot of the page I'm working on and highlighted an annotated the area and layout of the product data that I'd like to populate from the ProductCart store database: ![]() |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
Did you mean MS SQL, or really meant MySQL?
I am not aware of anyone attempting to run PC on MySQL. I would not hold out much hope there as there are some really complex SQL queries (search results itself is a real doozie!) in PC and I am quite sure that there would be significant syntax differences between the way MySQL handles some of the more advanced SQL syntax. As for the rest, it's all pretty straight forward stuff for any developer, even a novice. However, your question is way to vague for anyone here to help other than to say that the home page is already full of examples for exactly what you have in your screenshot. I'd have to assume that you are looking to query the db for something other than featured products, specials, new arrivals or best sellers (standard options). First we would need to know what criteria you are using to query the db to return a record set for (I dunno? top rated products? Products from some category subset? Clearance/low stock?). If you could at least provide the criteria for generating the record set, one of us might be able to help you further.
|
|
![]() |
|
MGatESS ![]() Groupie ![]() ![]() Joined: 12-July-2006 Location: United States Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() |
First, I guess it would be MSSQL (my host: JoltDigital.com has listed MySQL and MSSQL management) if that is the other database that ProductCart runs on besides MS Access. Currently have an MS Access database for our ProductCart, but we may change in the future to a SQL database (having some issues with the cart system that may be related to using an Access database).
Second, I thought I was fairly descriptive of what I wanted to do. I wanted to know what ASP coding I would need to employ to access the ProductCart database to pull specific field's data in a product record. They are as follows:
The table in the ProductCart Access database is titled "products". Is there some kind of security protocol that would need to be filtered through in order to pull and display the data in the record field? I ask because I think the database is protected on the server or else ANYONE could access the database outside of ProductCart. Hope this clarifies what I wanted to do.
|
|
![]() |
|
Brett ![]() Groupie ![]() ![]() Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
![]() ![]() ![]() ![]() ![]() |
It's very easy to do. Just find the database code and you can connect and run whatever query you want. I'm not sure about the security implications of this, so be sure to properly research that aspect of it.
|
|
![]() |
|
Terry_Humphrey ![]() Newbie ![]() ![]() Joined: 06-March-2013 Location: Florida Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Mark,
You could try something like this... http://wiki.earlyimpact.com/widgets/productcart_ecommerce_widget Using the dynamic publishing option with a little CSS and code customizations might be the quickest way to get you what you are looking for. If not, there are several companies on this forum that offer customizations, including us. The ProductCart Team Home of ProductCart shopping cart software |
|
![]() |
|
razor150 ![]() Newbie ![]() ![]() Joined: 29-May-2008 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
All of the setting you need to create a connection to the database are contained in the product cart files for your site. They are pretty easy to pick out by in the page files if you know what you are doing. They are all include files mostly at the top of the page that are brought in from the includes directory.
However, if you don't know what you are doing, and that is what it sounds like since you don't know how to make a connection to your database, I really wouldn't recommend you doing it. You can open yourself up to an SQL injection or any number of things that can put your customer's information at risk to hackers and your server at risk. It isn't worth the risk if you don't know how to secure your asp code. I would strongly suggest you go with one of the developers who make add ons for Product Cart. The company I work for uses WMS and Grey Beard for anything we don't have the time to do or can't do in house. We highly recommend them, but any of the developers here can do what you are asking.
Edited by razor150 - 08-May-2013 at 6:47pm |
|
Todd Sellers
Rings & Things |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |