| Author |
Message |
csstarter
Guest
|
Posted:
Tue Sep 13, 2005 12:52 am Post subject:
Shipping Rates Table |
|
|
I got a excel sheet from vendor with shipping zones which are divide
based on first three digits of zip codes and then each zone has
diffrent rt depending on quantities shipped...I presume I will hav
to write a pipeline comp which will grab shipping address zip an
calculate the shipping rate
i have 10 zones with range of zips in i
and then each of this zone has 50 different rates per quantity uptil
50
Maybe I just had a long day but I dont have a clue abt designing
table for this and to look up rate as per the shipping zipcode..
Hope i was clear..
Any help on this will be apppreciate |
|
| Back to top |
|
 |
Zoe Hart [MVP]
Guest
|
Posted:
Tue Sep 13, 2005 4:53 pm Post subject:
Re: Shipping Rates Table |
|
|
This is a common shipping rate structure. I've implemented it in the past
with two tables - one for the zip to zone relationship and then another for
the zone to rate relationship and then a stored procedure that joins them
together to get the desired result. The SQL's a little messy depending on
the complexity of the shipping logic, but it can be done. The pipeline
component ends up calling this stored procedure.
--
Zoe Hart
Commerce Server MVP
"csstarter" <rayeesur@gmail-dot-com.no-spam.invalid> wrote in message
news:mMSdnQQLFIsBvbveRVn_vQ@giganews.com...
| Quote: | I got a excel sheet from vendor with shipping zones which are divided
based on first three digits of zip codes and then each zone has a
diffrent rt depending on quantities shipped...I presume I will have
to write a pipeline comp which will grab shipping address zip and
calculate the shipping rate.
i have 10 zones with range of zips in it
and then each of this zone has 50 different rates per quantity uptill
50.
Maybe I just had a long day but I dont have a clue abt designing a
table for this and to look up rate as per the shipping zipcode...
Hope i was clear...
Any help on this will be apppreciated
|
|
|
| Back to top |
|
 |
csstarter
Guest
|
Posted:
Wed Sep 14, 2005 4:53 pm Post subject:
re:Shipping Rates Table |
|
|
I did write a pipeline component in C# but i dont know how to figur
out what values to read.Is there a best way to look what values
coming into pipeline and which can be used
public object ValuesWritten(
object[] valuesWritten = new object[1]
valuesWritten[0] = "order."+"shipments." + SHIPMENT_PRICE
return valuesWritten
public object ValuesRead(
object[] valuesRead = new object[3]
valuesRead[0] = "order."+"shipments." + SHIPMENT_ADDRESS_ID
valuesRead[1] = "order."+"shipments." + SHIPMENT_METHOD_ID
valuesRead[2] = "order."+"shipments." + SHIPMENT_PRICE
return valuesRead
When I run the pipeline it wont change any values even if i debu
program will not reach the beakpoint,how can i find the vaues wha
iam reading r actually the right ones...the values i have above i
looking at the other components which r above this componen |
|
| Back to top |
|
 |
Colin Bowern
Guest
|
Posted:
Wed Sep 14, 2005 8:53 pm Post subject:
re:Shipping Rates Table |
|
|
It sounds like you are trying to access the actual value data. The methods
you are working with are meant to help developers putting together pipelines
using the Pipeline Editor. The values will show up in the component properties
"Values Read and Written" tab in the editor. For more information see the
"IPipelineComponentDescription Interface" in the Commerce Server 2002 documentation.
Cheers,
Colin
| Quote: | I did write a pipeline component in C# but i dont know how to figure
out what values to read.Is there a best way to look what values r
coming into pipeline and which can be used?
public object ValuesWritten()
{
object[] valuesWritten = new object[1];
valuesWritten[0] = "order."+"shipments." + SHIPMENT_PRICE;
return valuesWritten;
}
public object ValuesRead()
{
object[] valuesRead = new object[3];
valuesRead[0] = "order."+"shipments." + SHIPMENT_ADDRESS_ID;
valuesRead[1] = "order."+"shipments." + SHIPMENT_METHOD_ID;
valuesRead[2] = "order."+"shipments." + SHIPMENT_PRICE;
return valuesRead;
}
When I run the pipeline it wont change any values even if i debug
program will not reach the beakpoint,how can i find the vaues what
iam reading r actually the right ones...the values i have above is
looking at the other components which r above this component |
|
|
| Back to top |
|
 |
Zoe Hart [MVP]
Guest
|
Posted:
Thu Sep 15, 2005 12:52 pm Post subject:
Re: re:Shipping Rates Table |
|
|
The main values coming into the pipeline are the order itself (pdispOrder)
and the pipeline context (pdispContext). In your code you can cast these
objects to IDictionary and then access the data within them. As Colin
mentioned, the methods you reference in your post are not methods you use to
determine values read and written, they are methods you use to publish to
the rest of the world which values your pipeline component reads from and
writes to. By implementing these methods you let a user of your component
right-click on the component to see its properties and find out what values
it reads and writes.
--
Zoe Hart
Commerce Server MVP
"csstarter" <rayeesur@gmail-dot-com.no-spam.invalid> wrote in message
news:SYGdndYhy86FzrXeRVn_vQ@giganews.com...
| Quote: | I did write a pipeline component in C# but i dont know how to figure
out what values to read.Is there a best way to look what values r
coming into pipeline and which can be used?
public object ValuesWritten()
{
object[] valuesWritten = new object[1];
valuesWritten[0] = "order."+"shipments." + SHIPMENT_PRICE;
return valuesWritten;
}
public object ValuesRead()
{
object[] valuesRead = new object[3];
valuesRead[0] = "order."+"shipments." + SHIPMENT_ADDRESS_ID;
valuesRead[1] = "order."+"shipments." + SHIPMENT_METHOD_ID;
valuesRead[2] = "order."+"shipments." + SHIPMENT_PRICE;
return valuesRead;
}
When I run the pipeline it wont change any values even if i debug
program will not reach the beakpoint,how can i find the vaues what
iam reading r actually the right ones...the values i have above is
looking at the other components which r above this component
|
|
|
| Back to top |
|
 |
|
|
|
|