rober4t wrote:Find:
if (result != decimal.Zero && sourceMeasureDimension.MeasureDimensionId != BaseDimensionIn.MeasureDimensionId)
Replace with:
if (result != decimal.Zero)
Find:
if (result != decimal.Zero && sourceMeasureWeight.MeasureWeightId != BaseWeightIn.MeasureWeightId)
Replace with:
if (result != decimal.Zero)
Please don't misunderstand my post. I fully understand that there are significant issues in the shipping and payment modules that I sincerely hope will be addressed in version 2.0. Until then, I hope this simple change will make life easier for folks.
I know you are trying to helpl, but I found more than one place where the syntax could be changed for both statements. I would feel more confortable if you provided either function or line numbers where the changes are to take place. Its a very big code block and us newbies run the risk of foobaring this thing up! Please respond with the exact place.
Thanks for taking the time to analyze and correct this part of the shippin issues. You've put me closer to opening day!
Thanks a lot man!!
Ok...I couldn't wait....Here is what i've got; Please respond with your answer as to whether I did it right or not
HERE IS THE FIRST ONE:
public decimal ConvertToPrimaryMeasureDimension(decimal quantity, MeasureDimension sourceMeasureDimension)
{
decimal result = quantity;
if (result != decimal.Zero)
{
decimal exchangeRatio = sourceMeasureDimension.Ratio;
if (exchangeRatio == decimal.Zero) throw new NopException(string.Format("Exchange ratio not set for dimension [{0}]", sourceMeasureDimension.Name));
result = result / exchangeRatio;
}
return result;
}
HERE IS THE NEXT ONE:
public decimal ConvertToPrimaryMeasureWeight(decimal quantity, MeasureWeight sourceMeasureWeight)
{
decimal result = quantity;
if (result != decimal.Zero)
{
decimal exchangeRatio = sourceMeasureWeight.Ratio;
if (exchangeRatio == decimal.Zero) throw new NopException(string.Format("Exchange ratio not set for weight [{0}]", sourceMeasureWeight.Name));
result = result / exchangeRatio;
}
return result;
}