close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Trying to Add Database Fields to Store

Thread began 4/20/2010 1:46 pm by carlene | Last modified 4/29/2010 6:33 pm by Eric Mittman | 4107 views | 17 replies |

carleneBeta Tester

Trying to Add Database Fields to Store

Hello,

I'm trying to build an online store for a Wholesaler. I added an populated a field to my database called ProductCost. I'd like this field to be the one that what the PowerStore uses to add up what is charged from the customers when they place an order. I want the ProductPrice field to be visible there as well - but just not what is added up.

I have Dreamweaver, eCart 5 and DataAssist if these will help me at all.

Here's my problem - I tried to change the Products_Results.php page in the Admin directory. I wanted to add the ProductCost field so that it appeared. I was thinking that I'd need to bind from the server behaviors and noticed that my database was not "connected" to my Dreamweaver page. (Although the database results are showing up in the live site.)

When I tried to do this - everything tested fine but I got this warning: "Missing Run-Time Value for variable: CIDParam"


Problem #2 - I used eCart to try to change the Database field that determines what's added up in the Cart from ProductPrice to ProductCost. Didn't exactly work. What am I missing?

Thanks!

Carlene

Sign in to reply to this post

carleneBeta Tester

Help! Now my store is completely broken and pages aren't showing up. Can someone please help me out here?

Thanks!

Sign in to reply to this post

carleneBeta Tester

Hello! Please help WebAssist Support!!!!

Hello??? Is anyone reading this??? Please help me!

I re-iterate the problem. I am building a wholesale store.

1) I added a field to my PowerStore 3 Database. This field is called ProductCost. This was appearing on the product pages as needed when I copied the code for ProductPrice and changed all of the Price to Cost in the needed places.

2) I use Dreamweaver with eCart and Data Assist. But am having issues with integrating them and the PowerStore 3.

3) I wish the ProductCost field to be what is added up by my store instead of ProductPrice. I still want ProductPrice to be there and I made it so that that database field is visible as well on product pages. (That is working.)

4) With eCart I tried to link the Add to Cart button to the ProductCost field. I added the ProductCost field to the eCart system as well.

5) Thinking that it might be necessary, I tried to link my Product Database with my PowerStore 3 via Dreamweaver's binding recordsets. This produced the error - "Missing Run-Time Value for variable: CIDParam"

6) I tried to change the Product_Results.php in both the Admin and the store site so that the ProductCost field was displaying.

7) My problem - After I uploaded the changes to my site - the Product_Results.php pages will not display. If I press the add to cart button it yields a blank page.

How do I change it so that the ProductCost is what is added up and so that my store works? (I have about 260 products in my database which took me WEEKS to manually edit, so changing the database is not an option!)

Thank you! Please help!

Sign in to reply to this post

carleneBeta Tester

Could someone please open a support ticket for me since there is no response?

Sign in to reply to this post

Eric Mittman

I would like to help you out with your setup. You should first revert you files back to the original ones for PowerStore to get things working again.

Once you have things back to normal you can begin the updating. If you would like to add an additional field to the products you will first need to add this column to your db. Once you have done that you can update the product insert and update pages to include a form element for the new value. The next thing to do would be to update the DataAssist Insert and Update server behaviors so that the new value will be recorded in the db.

All of this should be worked out and tested before you do anything to the files on the front end of the store. Depending on what you would like to do on the front end of the store it might require some custom coding to get things worked out. Please post back with any questions or issues that you are experiencing in regards to the updates on the back end and we will help with what we can.

Sign in to reply to this post

carleneBeta Tester

Hi Eric,

Could you please tell me which files I should replace on my server with the "original" ones. I have already done extensive CSS customization and have already added the fields to my database. I don't want to overwrite what I've already done by doing a clean install. Just which files will get me back to default?

Thanks!

Carlene

Sign in to reply to this post

carleneBeta Tester

Eric,

Well - I replaced some of the files and discovered that the eCart Definition file was the culprit and what was breaking my store. I replaced it with one from the original files I downloaded.

As to what you suggested:
"If you would like to add an additional field to the products you will first need to add this column to your db. Once you have done that you can update the product insert and update pages to include a form element for the new value. The next thing to do would be to update the DataAssist Insert and Update server behaviors so that the new value will be recorded in the db."

I've added and populated the field in my database. How do I update the product insert and update pages then? Using DataAssist that is. I'd like to do this in a way that doesn't break the store. I'm now afraid of just diving in and changing things!

Thanks for your help. My other (paypal) problem is still happening with my other store.(I have another post about that.)

Thanks!

Carlene

Sign in to reply to this post

Eric Mittman

Since you have the columns in the db already the next step is to update the insert and update pages. You should work on one first, then the other.

The insert page is Products_Insert and the update page is Products_Update. If you have made any customizations to these pages you should make sure to back them up first.

On the insert page you will need to add in a new form element to hold the new value. Once you add in this new form element you will need to edit the insert server behavior. You can just double click on it in the server behaviors tab. The only thing you need to change is on the screen where the columns are associated with the values from the form. You need to select your newly added column and using the lightning bolt icon select the new form element you just added. That is it for the insert page.

For the update page you will do the same thing but you will want to default the form field to the value that comes from the recordset. You can set the value like the other inputs, just update the name of the column to be the new column you added to the table.

Make sure that you are testing the pages out after you make any changes to ensure that things are working as you expect them to be. PowerStore has a bit gong on in these pages and it can be easy to break the store whenever you make edits to these pages.

Sign in to reply to this post

carleneBeta Tester

Thanks so much Eric! I will try this tomorrow.

Sorry to keep bugging you with this - but there are two other problems that I am having.

1) Is detailed on this page: showthread.php?t=12382

2) How do I change the Cart so that it is using my added database field ProductCost to add everything up - rather than the ProductPrice field? I have eCart 5 as well as DataAssist and Dreamweaver. I had messed up everything when I tried to change this by double clicking on the eCart Add from Recordset Server Behavior.

Thanks so much for your help! I'm getting quite far with my two stores!

Sign in to reply to this post

Eric Mittman

It looks like your other thread is being worked on with Jason so I will leave it alone. Thanks for posting back with the update on this.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...