close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Shipping Charges by Zone

Thread began 6/30/2010 9:35 am by robert222776 | Last modified 7/07/2010 6:31 pm by Eric Mittman | 1977 views | 8 replies |

robert222776

Shipping Charges by Zone

I have a client with a two tier shipping charge system (according to Zip Code) already in place with another cart solution (not WA). He would like to change to PS3, but maintain his current shipping charge scheme. So, there will be no real time charges from any of the shipping companies supported by PS3, but instead a scheme where a shipping charge will be added according to the "zone" where the buyer lives. There are just two zones, and every product has a zone 1 ("west of the Mississippi") and a zone 2 ("east of the Mississippi" shipping cost associated with it.

Can this scheme be integrated into PS3 in place of the built in shipping solutions? I would expect to have to use eCart5 which I own.

If it can be done, can you please give me a rough outline of the steps needed? To begin, I know I will have to add the two fields (zone 1 and zone2) for the shipping costs, either added to the ps3_products table, or create a new three column table (ps3_shipping) with fields for ProductID, Zone1, and Zone2.

After that, please list the PS3 site pages that would be affected by this kind of change (besides shipping.php).

As an aside, would the DreamweaverCS5 feature that integrates CMS be of any help with "seeing" the pages involved in this makeover to PS3?

Thanks,
Robert

Sign in to reply to this post

Eric Mittman

Making the shipping work like this with two different costs for each item would require a bit of customizing with eCart is not something that would be supported within PowerStore. Since you have eCart you could make the updates that would be needed but there are a few steps to this.

The first thing you would need to do is add the shipping costs columns to your items table. Next you would need to update the admin insert and update pages to allow you to set and edit the values. Once you have got the back end stuff worked out you can begin on the front end.

For the front end the first thing to do would be to update the cart files to make it so you can edit the cart without it breaking other parts. Here is a link to the tread with the updated files:

showthread.php?t=12820

You would need to add in the two new columns to the cart. You would then need to set the bindings for the new columns in the add to cart server behavior. This would get you a setup with the shipping charges set for each item in the cart. You would then need to set a session variable during the checkout to determine what zone they are in. You would then setup two charge rules, one for zone 1 and one for zone 2, then based on the zone in the session variable you would trigger one charge over the other. For the amount of the charge you would just base it on the subtotal for the zone 1 or zone 2 column depending on which zone rule you are working with.

Sign in to reply to this post

robert222776

Thanks Eric!

FYI I am using DWCS4 with all the latest extension relevant to what I am trying to accomplish.

I added the fields to the ps3_products table with some data. I also added the new form fields to the Product_Insert page via code view. Now, when I attempt to edit the Products_Insert page by clicking on the Insert Record (ps3_products) server behavior, the data assist extension opens fine, but it cannot locate the database table in question. That is, in the General Configuration database area of the window I see:

Trigger: Button insert pressed
Connection: PowerStoreConnection
Table: ***No Table Found

and there are no tables to choose from in the drop down menu.

As you would expect with the above:

The session variable key column is blank ("no column found" is available in the drop down
Store As: WADA_Insert_Products

I know the Product_Insert page worked fine (prior to any changes), so I am unclear why data assist cannot find the table. This is the first time I have tried to access the server behavior though. When I close out of the extension window, the appropriate area of code is highlighted, and it looks like what needs to be edited, but I would prefer to use the extension.

When I get this to work I will edit the Product_Update page.

As a side note, it takes a long time (3-5 minutes) for the extension to open. I see a blank insert record wizard window and a file activity window until the extension finally opens. Most of the time the file activity window is "not-responding" until it wakes up, and sometimes it goes back and forth bewteen responding and not responding.

Another FYI, there are a number of record set and dynamic list menu server behaviors (especially on the product_update page) with the red exclamation point, and I have not edited this page yet. Shouldn't these be resolved at some point too?

Any help with any of the above would be greatly appreciated.

Robert

Sign in to reply to this post

robert222776

Please see the previous updated thread.

Thanks,
Robert

Sign in to reply to this post

Eric Mittman

in your local DW site that you are working with do you have a connection to your live db? Based on the recordset having the exclamation points, the DataAssist server behavior taking a while to load and the table not being present it seems that you might not be able to connect to the db directly from within DW.

As a test of this I opened up my products insert page and edited the Insert Record server behavior by double clicking on it in the server behaviors tab. I was able to interact with the local PowerStore DB without issue.

Sign in to reply to this post

robert222776

I have modified the database, and the code in the admin Product_Update and Products_Insert pages. They work fine as far as adding the two shipping zone charges for each product, and generally adding new and editing existing products.

There is one issue though in that for a product with options, I cannot edit a field without checking the "update all options" box for the field in question. In other words, the update will not take for an individual (green) option unless all options (red, blue, and green) are updated also. Products without options update fine.

Any ideas?

Now, for the cart and confirm pages, I am not exactly clear on how to bring the shipping zone charges into the process. Do I need to change the cart?. There are not currently any shipping charges on that page.....just "charges". On the confirm page there are shipping charges and charges (separate fields). It seems like the only page I need bring in the new shipping charges is the confirm page. True?

My limited programming skills tells me that I need to query the database (from the confirm page) for one of the two shipping zone charges based on the zip code entered on the checkout page, for each product in the cart. Then sum the shipping charges up for display on the confirm page. Does this sound right?

BTW, I moved all my files to my own xampp server. The database connections seem fine, but I still see a lot of red exclamation points attached to the server behaviors.

Also, there is one other issue that bothers me. When I click on the Recordset (WADAProducts) server behavior from the Products_Update page, and open the SQL statement window and hit "test", I get no data......seems like I should see all the data in the products table in the database?????

Thanks,
Robert

Sign in to reply to this post

Eric Mittman

The way that you are adding in the zone values for the items you will not be able to add individual values for the various options. It will need to be done on a per item basis.

To create the shipping zone charges you will just use the subtotal of the zone columns. For zone 1 shipping you will use the subtotal of the zone 1 column, then for zone 2 use the subtotal of the zone 2 column.

You will need to determine what zone the items are being shipped to, then based on this you will trigger one of the charge rules versus the other. How you determine what zone to send to based on the user input information will be a custom part of this that you will have to come up with.

When you are testing an update recordset you will need to make use of the filtered variable in order for the recordset to return any results. The rs on the update page is filtered for the specific item based on it's id.

Sign in to reply to this post

robert222776

Any thoughts on the above problem repeated here:

There is one issue though in that for a product with options, I cannot edit a field without checking the "update all options" box for the field in question. In other words, the update will not take for an individual (green) option unless all options (red, blue, and green) are updated also. Products without options update fine.

Sign in to reply to this post

Eric Mittman

What happens for you when you try to update a field without checking the box to update all of the products? The update should occur for the individual item. Is this only a problem with items that you have entered zone information for? Or has it been a problem since you updated the page to add in the zone values?

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