PDA

View Full Version : Display Basket weight


Pat
09-06-06, 06:13 PM
Looking for the code to display the basket weight.

Also need the code for an IF THEN statement to figure out the following:

If basket Weight is < 1000 lbs THEN "You Pay Shipping" ELSE "Free Shipping"


Thanks

Pat

wcw
09-06-06, 06:25 PM
If you have the Emporium Plus Tool Kit module, you would sum the individual weights in the basket_contents template, eg

<mvt:item name="toolkit" param="math_multiply|lineweight|l.all_settings:item:weigh t|l.all_settings:item:quantity" />
<mvt:item name="toolkit" param="math_add|basketweight|basketweight|lineweight" />

Then after the basket_contents is completely displayed, you have the variable of the total weight which can be displayed or evaluated for the conditional.

<mvt:if expr="g.basketweight LT 1000">
pay
<mvt:else>
free
</mvt:if>

Red Flare
09-07-06, 10:11 AM
If you have the Emporium Plus Tool Kit module, you would sum the individual weights in the basket_contents template, eg

<mvt:item name="toolkit" param="math_multiply|lineweight|l.all_settings:item:weigh t|l.all_settings:item:quantity" />
<mvt:item name="toolkit" param="math_add|basketweight|basketweight|lineweight" />

Then after the basket_contents is completely displayed, you have the variable of the total weight which can be displayed or evaluated for the conditional.

<mvt:if expr="g.basketweight LT 1000">
pay
<mvt:else>
free
</mvt:if>



Can this total basket weight as you described it be displayed using your Addendum module. I need a way to display it on the printed invoice.

tx

wcw
09-07-06, 12:39 PM
You could have a question that instead of being a text input, would be a hidden input.

<input type="hidden" name="question1" value="&mvt:global:basketweight;">