close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Next Day Delivery option - how best to apply?

Thread began 4/01/2014 5:20 am by Nathon Jones Web Design | Last modified 5/13/2014 8:38 am by Jason Byrnes | 2192 views | 29 replies |

Nathon Jones Web Design

Next Day Delivery option - how best to apply?

We want to add an option for the customer to be able to upgrade their postage to next day delivery. Is this best done by adding Next Day Delivery as a static item with its own Add to Cart button?

My confusion over this is because my client wants to charge two different amounts for Next Day Delivery based on the TotalWeight but that would mean adding two different Add to Cart buttons, wouldn't it?

Could I drive the price of the Next Day Delivery static product by the TotalWeight value, like and IF/ELSE statement?
How would that look in the Add to Cart button section above the header?

Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

no, this would not be done through the add to cart button.

it would be done through the shipping tab of the eCart object.

you could add a checkbox to the checkout page for next day shipping.


the checkout page submits to the confirm_cart page.

on the confirm_cart page, set a session based on the next day shipping selection, for example, if the checkbox is named "nextDay"

<?php
if(isset($_POST['nextday']) && $_POST['nextday'] != "") $_SESSION['nextDay'] = "1";
?>

then in the eCart object, create a shipping rule using the trigger:
based on session variable value nextDay = 1

if you want to create multiple rules based on weight, add the weight conditions to the triggers as well.

Sign in to reply to this post

Nathon Jones Web Design

This is best served on the checkout page because it might depend on the country selected in the shipping address section, right?
How would we, therefore, affect the shipping price based on the country selection in the shipping address?

Our client wants to offer three different types of shipping options (hooray!)....

First Class
Under £75 + under 1kg = £3
Under £75 + over 1kg = £5
Over £75 + under 1kg = Free
Over £75 + over 1kg = £5
Over £75 + over 2KG = £12.50

Standard (3-5 day delivery)
Under £75 + under 1kg = £3
Under £75 + over 1kg = £3
Over £75 + under 1kg = Free
Over £75 + over 1kg = Free

Guaranteed Next Day
Under £75 + under 1kg = £5
Under £75 + over 1kg = £7.50
Over £75 + under 1kg = £5
Over £75 + over 1kg = £7.50

Is the best way to achieve this to offer three radio buttons on the checkout page and then have the Shipping rules, in the Shipping tab, respond to which sessions are made live by the users selection from the radio buttons?

Just a bit confused about how best to achieve this. Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

  Is the best way to achieve this to offer three radio buttons on the checkout page and then have the Shipping rules, in the Shipping tab, respond to which sessions are made live by the users selection from the radio buttons?  




Yes, add the 3 radio buttons to the checkout page, using values like 1 for first class, 2 for standard and 3 for next day.

then create a shipping rule for each shipping type and weight / price range option.

for example, if the session is named shipType:
First Class
Under £75 + under 1kg = £3

triggers:
based on Session variable Value "shipType" has a value of "1"

and
Based On column subtotal "weight" is "<" "1"

AND based on cart subtotal "<" "75"

Sign in to reply to this post

Nathon Jones Web Design

Thank you Jason.

Regarding layout, how best do I tidy this up in conjunction with my checkout page?
I've tried this:

<div class="lineGroup">
<div class="fullColumnGroup">

<label>
<input type="radio" name="ShippingType" value="1" id="ShippingType_0">
Next Day Delivery ()</label>
<br>
<label>
<input type="radio" name="ShippingType" value="2" id="ShippingType_1">
First Class Delivery ()</label>
<br>
<label>
<input type="radio" name="ShippingType" value="3" id="ShippingType_2">
Standard Delivery ()</label>

</div>
</div>

...but it's all left aligned. Would appreciate your advice as there is clearly some styling done on the labels etc that I'm not clear on.
http://www.ledwarehouseuk.com/checkout.php

Much appreciated.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

please be more specific on how you would like the radio buttons to look. I cannot give advice without details on what the outcome should be.

Sign in to reply to this post

Nathon Jones Web Design

Sorry, it was just how to get them in line with the other form fields above? So they would begin just below the shipping postcode field.

Sign in to reply to this post

Jason ByrnesWebAssist

use the sublabel class for the labels, and and use the for attribute to place the labels on the right rather than wrapping them, for example:

<label for="ShippingType_0" class="sublabel">Next Day Delivery ()</label>
<input type="radio" name="ShippingType" value="1" id="ShippingType_0">

Sign in to reply to this post

Nathon Jones Web Design

That didn't work. They all ended up in one line?

Cheated it a bit and have the following which seems to work:

<div class="lineGroup">
<div class="fullColumnGroup">
<label for="ShippingType_0" class="sublabel">&nbsp;</label>
<input type="radio" name="ShippingType" value="1" id="ShippingType_0" tabindex="23" checked>&nbsp;&nbsp;Standard Delivery (3-5 Days)
</div>
</div>

<div class="lineGroup">
<div class="fullColumnGroup">
<label for="ShippingType_1" class="sublabel">&nbsp;</label>
<input type="radio" name="ShippingType" value="2" id="ShippingType_1" tabindex="24">&nbsp;&nbsp;First Class Delivery (1-2 Days)
</div>
</div>

<div class="lineGroup">
<div class="fullColumnGroup">
<label for="ShippingType_2" class="sublabel">&nbsp;</label>
<input type="radio" name="ShippingType" value="3" id="ShippingType_2" tabindex="25">&nbsp;&nbsp;Next Day Delivery
</div>
</div>

Appreciate the help.
Thank you.
NJ

Sign in to reply to this post

Nathon Jones Web Design

I've added three radio buttons to the checkout.php page to allow the customer to select a preferred type of delivery but when I make a selection and click "Continue" the shipping isn't added or displayed.

Just to check...what file/s do I need to upload when I've edited my shipping calculations in the eCart object?

Also, because I've now set the shipping to trigger based on a session variable existing the standard shipping price isn't displaying on the view cart page. I was thinking I would just remove the session based trigger for standard shipping, because standard would be default and wouldn't need to be selected by the customer, however it occurred to me that if the customer then selects "First Class" shipping, for example, it would add that AND the default standard shipping fee?

Would appreciate your advice and assistance. Thank you.
NJ

EDIT: How do I edit a session? I can see it in the list of Sessions in the Bindings panel but I can't seem to do anything with it? I'm wondering if it is at fault here?

You'd previously advised adding:
<?php
if(isset($_POST['nextday']) && $_POST['nextday'] != "") $_SESSION['nextDay'] = "1";
?>

How do I change that to make the Session value the value that's passed from the ShippingType radio button selection made by the customer?

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