Developer forum

Forum » Development » Missing Shipping Fee Amount

Missing Shipping Fee Amount


Reply
Hi there,

Is there a reason why the value / price of a specific shipping method is not available in step 3? When I loop over the available shipping parties, I see tags such as:

Ecom:Cart.Shippingmethod.ID
Ecom:Cart.Shippingmethod.Name
Ecom:Cart.Shippingmethod.Description
Ecom:Cart.Shippingmethod.FeeFree

However, I don't see the amount / price associated with that shipper. Any reason why? The cart seems to know the value as in the next step the amount is added to the cart correctly.

Also, wouldn't it make sense to render FeeFree as an empty string when not available so you can use in an If Defined?

Kind regards,

Imar

Replies

 
Reply
 
Hi Imar,

CartV2 adds two new tags to shipping methods...

Ecom:Cart.ShippingMethod.Price (with price extensions)
Ecom:Cart.Shippingmethod.IsSelected ("true" or empty - just the way we like it)

The FeeFree tag has not changed though. But wouldn't it make more sense if the tag returned the actual amount entered in the field "No fee for purchases over"?

We can use Ecom:Cart.ShippingMethod.Price.IsZero to check if there is a fee.


/Morten
 
Reply
Hi Morten,

Yeah, I had seen those tags. Unfortunately, I am stuck with V1 one at the moment as I have to rely on a payment gateway for V1 and we're close to the dead-line.

Any other ideas? Is this is extensible somehow?

Imar
 
Reply
I guess you would have to implement an OrderTemplateExtender and render your own version of the shippingmethods loop... or use an XSLT template.

Or if you like to experiment... you can combine V1 and V2 :)
 
Reply
Yeah, lots of options.... I ended up with this for the time being:

if (Order.StepNum == 3 && renderingState == TemplateExtenderRenderingState.Before)
{
 Template shippingTemplate = template.GetLoop("Shippingmethods2");
 ShippingCollection shippers = Shipping.getShippingmethods(Order.CustomerCountryCode);
 foreach (Shipping shipper in shippers)
 {
  shippingTemplate.SetTag("Ecom:Cart.Shippingmethod.ID", shipper.ID);
  shippingTemplate.SetTag("Ecom:Cart.Shippingmethod.Name", shipper.Name);
  shippingTemplate.SetTag("Ecom:Cart.Shippingmethod.Description", shipper.Description);
  shippingTemplate.SetTag("Ecom:Cart.Shippingmethod.PriceOverMaxWeight", shipper.PriceOverMaxWeight);
  shippingTemplate.CommitLoop();
 }
}

However, things would be a *lot* easier if Dynamicweb added the PriceOverMaxWeight tag to the static RenderShipping method of the Renderer class:

template.SetTag("Ecom:Cart.Shippingmethod.PriceOverMaxWeight", shipping.PriceOverMaxWeight)

It should probably be rendered using Renderer.RenderPrice so you get stuff like VAT and currency code as well.....

Nicolai: does this sounds reasonable or is there a reason that PriceOverMaxWeight is missing?

Kind regards,

Imar
 
Nicolai Høeg Pedersen
Reply
Hi Imar

Do not see any reason. I've added the rendering of the PriceOverMaxWeight as a priceinfo.

 

You must be logged in to post in the forum