close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

New Columns not added to cart or database

Thread began 7/20/2010 2:25 pm by anonymous | Last modified 7/22/2010 10:05 am by Jason Byrnes | 880 views | 7 replies |

anonymous

New Columns not added to cart or database

Hi,

I have an Ecart 5 application for conference registration. It worked fine until I started adding columns to the Ecart object to capture more data. Here's the issue:

The registration involves purchasing exhibitor booths. Once a booth is purchased there are options to buy electrical hookups, another to order a corner booth and one to order a sales spot. They are items in the products table.

The items are added to the cart fine with all of the fields except for the new fields that I added to the ecart. I added a field to hold the value "Yes" when either a comer booth, electric hookup or sales spot is added to the cart. However, the values for these columns are not there when I use the cart binding for the column. I'm trying to add the value to the registration table via an insert on the confirm page and can't seem to get the values from these columns.

Am I missing something here? Maybe there is a better way to do this? I thought it would be easy to add a column, edit the add to cart button to bind the column to a default value of "Yes" and then grab that value from the cart in the bindings panel to insert into a table on the confirm page.

I really need to get this working ASAP as the registrations have started and the client is having to manually adjust each order. I'm a Library subscriber.

Thanks,

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

can you post a link where I can see this?

It sounds like you want to make the corner booth, electric hookup or sales spot a check box in your add to cart button? is this correct?

If so:
In the add to cart button, go to the bindings panel, select the corner booth, electric hookup or sales spot columns and select the Updateable as Checkbox option. This will add the checkbox to the add to cart form.

In design View, you will need to select each of the checkboxes, and set the Checked Value in the property inspector to "yes" (without the quotes).

Sign in to reply to this post

anonymous

Thanks

Hi Jason,

Thanks for the quick response.

This may work, but I also need to add a price for each, although the sales spot order is free. So how do I add the check box with the value=Yes and add $50 for the electrical hookup and $60 for the corner booth for each button?

I think this may solve the problem if I can do both the yes value and the price when the check box is checked.

Thanks again for the quick response...it means a lot when the client is all over me!

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

in the cart object, go to the calculations tab.

You will need to add a new calculation named realPrice and edit the TotalPrice Calculation.

the exact calculation depends on the name of your electrical hookup corner booth columns. For my example, I will assume they are named electricalHookup and cornerBooth. keep in mind PHP is case sensitive.

realPrice = (abs([electricalHookup] == 'yes')?50:0) + (abs([cornerBooth] == 'yes')?60:0) + [Price]

TotalPrice = ((abs([electricalHookup] == 'yes')?50:0) + (abs([cornerBooth] == 'yes')?60:0) + [Price])* [Quantity]

In your cart display, you will need to change the Price diplsy to use the realPrice calulation instead of the Price:
change:

php:
<?php echo WA_eCart_DisplayMoney($cartname $cartname->DisplayInfo("Price")); ?>



to:

php:
<?php echo WA_eCart_DisplayMoney($cartname $cartname->DisplayInfo("realPrice")); ?>





you will also need to change the local checkout code on the confirm page to pass the realPrice instead of the price to the gateway.

Sign in to reply to this post

anonymous

Thanks again

Hi Jason,

This would work, except the client wants the corner booth, electrical hookup and sales spot to be separate items in the cart so they can do financial assessments after the conference and run some reports based on individual items sales.

Is there a way to have the separate add to cart buttons I have for each one to pass the value "Yes" when they are added to the cart? They are currently added to the cart just fine. I just want to be able to add the Yes value to a database column when a user buys one of these items, along with adding it to the cart.

That's what I was hoping to do by just adding the columns to the cart and amending the add to cart buttons to have a default value of Yes in that column. It doesn't seem to work that way. I've also tried adding the binding for the column and using the Up-datable as hidden option with no luck.

Seems like I'm just missing something simple.


Thanks,

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

The options cannot be separate items in the cart, however if you set the unique attribute for each of the columns, they will be treated as unique items.

After the hidden element is added to the page, change the type attribute from hidden to checkbox.

I am including a quick sample application i put together to illustrate how it should be done, it includes on the Hook up and corner spot, but you should be able to add on to it.

Attached Files
addBooth.zip
Sign in to reply to this post

anonymous

Unique Attribute

Hi Jason,

I tried your solution, and, while it would probably work for most folks, the client wants the corner booth, electrical hookup and sales spot to be separate ATC buttons. So, is there a way to have an ATC from recordset button that pulls all of the price, itemID, name, etc...from the products table, as well as a column with the word "Yes" in it. Can I then bind that column to the ElectricHookup column in the Ecart object? Just like the other columns?

Then when the button is clicked and the item is added to the cart the value from the products table that was bound to the cart column would be added to the cart for that item. Is there a reason that won't work?

I've already got the ATC buttons working on the page, I just need to figure out how to add the Yes value to the item when it's added to the cart.

I'll keep trying to push the option approach but if there's a way to just get the value so I can put it in the registration table in the confirm page that would be great.

Thanks again and let me know if you can think of anything that would work.

Tony

Sign in to reply to this post

Jason ByrnesWebAssist

The electrical hookup, corner and sales spot are options of the both, so you would need to have a seperate add to cart button for each both configuration to do it the way you describe.

that would be about 12 different add to cart buttons to account for each possible configuration of booth.

Sign in to reply to this post

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...