Announcement

Collapse
No announcement yet.

Minimum and Maximum Module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Looks like the 'Basket_Line' field needed to be changed. Here is the updated code:
    Code:
    <mvt:comment>
    	<mvt:if expr="g.Action EQ 'RGRP'">
    </mvt:comment>
    <mvt:if expr="g.Action EQ 'RPRD'">
    	<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)"/>
    	<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)"/>
    	<mvt:assign name="g.Restore_Link" value="miva_variable_value('Restore_Link' $ g.Restore_Counter)"/>
    	<div class="message message-info">
    		<b>&mvte:global:Restore_Name;</b> has been removed from your cart.
    		<a href="&mvte:global:Restore_Link;">Undo?</a>
    	</div>
    	<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1"/>
    </mvt:if>
    <mvt:item name="cim_qmin" param="minmax_error_message"/>
    <mvt:if expr="l.settings:basket:empty">
    	<h5 class="column whole message message-info">Your shopping cart is currently empty.</h5>
    	<p class="column whole">
    		<a href="&mvte:urls:SFNT:auto;" class="button button-square">Start Shopping</a>
    	</p>
    	<mvt:exit/>
    </mvt:if>
    <div class="column whole medium-all-hidden cart-summary">
    	<span class="column half"><strong>Cart Subtotal:</strong></span>
    	<span class="column half align-right"><strong>&mvt:basket:formatted_total;</strong></span>
    	<br class="clear"/>
    	<hr noshade/>
    	<p class="align-center">
    		<a href="&mvt:global:secure_sessionurl;Screen=OINF&Store_Code=&mvte:store:code;" title="Proceed to Secure Checkout" class="button button-block button-square button-medium bg-green white uppercase">Checkout</a>
    	</p>
    	<div class="basket-header-row align-center">Cart Summary</div>
    </div>
    <div class="column whole cart-contents">
    	<div class="row hide medium-show basket-header-row">
    		<div class="column five-eighths">Product</div>
    		<div class="column one-eighth align-center">Quantity</div>
    		<div class="column one-eighth align-right">Price</div>
    		<div class="column one-eighth align-right">Subtotal</div>
    	</div>
    	<mvt:foreach iterator="item" array="basket:items">
    		<mvt:assign name="l.settings:item:restore:link" value="l.settings:urls:BASK:auto_sep $ 'Action=ADPR&Product_Code=' $ l.settings:item:product:code $ '&Quantity=' $ l.settings:item:quantity"/>
    		<div class="row basket-product-row">
    			<div class="column one-fourth align-center">
    				<mvt:if expr="l.settings:item:imagetypes:image1">
    					<img src="&mvte:item:imagetypes:image1;" alt="&mvt:item:name;">
    				<mvt:else>
    					&nbsp;
    				</mvt:if>
    			</div>
    			<div class="column three-fourths medium-three-eighths">
    				<h4 class="nm">
    					<a href="&mvte:item:link;" title="&mvt:item:name;">
    						&mvt:item:name;
    						<mvt:if expr="l.settings:item:upsold">&nbsp;(Special Offer)</mvt:if>
    					</a>
    				</h4>
    				<div class="basket-product-details">
    					<p>Code: &mvt:item:code;</p>
    					<mvt:foreach iterator="option" array="item:options">
    						<mvt:assign name="l.settings:item:option_counter" value="l.settings:item:option_counter + 1"/>
    						<p>
    							<mvt:if expr="l.settings:option:option_id">
    								<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ l.settings:item:option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ l.settings:item:option_counter $ ']:value=' $ l.settings:option:opt_code"/>
    								&mvt:option:attr_prompt;: &mvt:option:opt_prompt;
    							<mvt:elseif expr="NOT ISNULL l.settings:option:data">
    								<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ l.settings:item:option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ l.settings:item:option_counter $ ']:value=' $ l.settings:option:data"/>
    								&mvt:option:attr_prompt;: &mvt:option:data;
    							<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
    								<mvt:assign name="l.settings:item:restore:link" value="l.settings:item:restore:link $ '&Product_Attributes[' $ l.settings:item:option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ l.settings:item:option_counter $ ']:value=' $ l.settings:option:data_long"/>
    								&mvt:option:attr_prompt;: &mvt:option:data_long;
    							<mvt:else>
    								&mvt:option:attr_prompt;
    							</mvt:if>
    						</p>
    					</mvt:foreach>
    					<mvt:foreach iterator="discount" array="item:discounts">
    						<mvt:if expr="l.settings:discount:display">
    							<p>&mvt:discount:descrip;: &mvt:discount:formatted_discount;</p>
    						</mvt:if>
    					</mvt:foreach>
    					<mvt:foreach iterator="discount" array="option:discounts">
    						<mvt:if expr="l.settings:discount:display">
    							<p>&mvt:discount:descrip;: &mvt:discount:formatted_discount;</p>
    						</mvt:if>
    					</mvt:foreach>
    					<mvt:comment>
    						<mvt:if expr="l.settings:item:product:id">
    							<p>
    								<a href="&mvte:urls:WISH:secure_sep;Action=MPWL&Item_ID=&mvta:item:item_id;">+ Add To Wishlist</a>
    							</p>
    						</mvt:if>
    					</mvt:comment>
    				</div>
    			</div>
    			<div class="breaker clear medium-all-hidden"></div>
    			<div class="column half x-small-offset-one-fourth x-small-one-fourth medium-offset-none medium-one-eighth">
    				<mvt:if expr="l.settings:item:upsold">
    					<p class="align-center">&mvt:item:quantity;</p>
    				<mvt:else>
    					<form method="post" action="&mvte:urls:BASK:rr;" class="nm">
    						<mvt:comment>
    							<input type="hidden" name="Action" value="QTYG"/>
    							<input type="hidden" name="Basket_Group" value="&mvte:group:group_id;"/>
    						</mvt:comment>
    						<input type="hidden" name="Action" value="QNTY"/>
    						<input type="hidden" name="Basket_Line" value="&mvte:item:line_id;"/>
    						<input type="hidden" name="Old_Screen" value="BASK"/>
    						<input type="hidden" name="Offset" value="&mvte:global:Offset;"/>
    						<input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;"/>
    						<input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;"/>
    						<input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;"/>
    						<input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;"/>
    						<input type="hidden" name="Restore_Name" value="&mvt:item:name;">
    						<input type="hidden" name="Restore_Link" value="&mvte:item:restore:link;">
    						<mvt:comment>
    							<input type="tel" name="Quantity" value="&mvt:item:quantity;" class="align-center"/>
    						</mvt:comment>
    						<mvt:comment>
    							<input type="tel" name="Quantity" value="&mvt:item:quantity;" class="align-center float-left increase-decrease-input" data-min="0">
    							<div class="increase-decrease-wrap float-left">
    								<span class="button increase-quantity js-increase-quantity" unselectable="on" data-icon="&#x4c;"></span>
    								<span class="button decrease-quantity js-decrease-quantity" unselectable="on" data-icon="&#x4b;"></span>
    							</div>
    						</mvt:comment>
    						<mvt:item name="cim_qmin" param="bask"/>
    						<button type="submit" class="button button-small button-small-font js-update-quantity">
    							<span data-icon="&#xe02a;" class="medium-inline"></span>Update
    						</button>
    					</form>
    					<form method="post" action="&mvte:urls:BASK:rr;" class="nm" class="">
    						<mvt:comment>
    							<input type="hidden" name="Action" value="RGRP"/>
    							<input type="hidden" name="Basket_Group" value="&mvte:group:group_id;"/>
    						</mvt:comment>
    						<input type="hidden" name="Action" value="RPRD"/>
    						<input type="hidden" name="Restore_Name" value="&mvt:item:name;">
    						<input type="hidden" name="Restore_Link" value="&mvte:item:restore:link;">
    						<input type="hidden" name="Basket_Item" value="&mvte:item:line_id;"/>
    						<input type="hidden" name="Offset" value="&mvte:global:Offset;"/>
    						<input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;"/>
    						<input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;"/>
    						<input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;"/>
    						<input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;"/>
    						<button type="submit" class="button button-mini button-block bg-transparent remove-item">
    							<strong class="medium-inline">&times;</strong> Remove
    						</button>
    					</form>
    				</mvt:if>
    			</div>
    			<div class="column hide medium-show medium-one-eighth align-right">
    				<mvt:if expr="l.settings:item:price EQ '0' OR l.settings:item:price EQ '0.00' OR l.settings:item:price EQ 0.00 OR l.settings:item:price EQ 0">
    					<p>&nbsp;</p>
    				<mvt:else>
    					<p>&mvt:item:formatted_base_price;</p>
    				</mvt:if>
    				<br>
    				<mvt:foreach iterator="option" array="item:options">
    					<mvt:if expr="l.settings:option:base_price">
    						<p>
    							<small>&mvt:option:formatted_base_price;</small>
    						</p>
    					</mvt:if>
    				</mvt:foreach>
    			</div>
    			<div class="column half medium-one-eighth medium-align-right">
    				<p class="medium-all-hidden"><strong>Item Subtotal</strong></p>
    				<mvt:if expr="l.settings:item:subtotal_base_price NE l.settings:item:subtotal">
    					<s>&mvt:item:formatted_subtotal_base_price;</s><br>
    				</mvt:if>
    				<p>&mvt:item:formatted_subtotal;</p>
    				<mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
    					<mvt:if expr="l.settings:option:subtotal_base_price NE l.settings:option:subtotal">
    						<s>
    							<small>&mvt:option:formatted_subtotal_base_price;</small>
    						</s><br>
    					</mvt:if>
    					<p>
    						<small>&mvt:option:formatted_subtotal;</small>
    					</p>
    				</mvt:if>
    			</div>
    		</div>
    	</mvt:foreach>
    	<mvt:foreach iterator="coupon" array="basket:coupons">
    		<div class="row basket-product-row">
    			<div class="column whole">
    				<form method="post" action="&mvte:urls:BASK:rr;" class="nm">
    					<input type="hidden" name="Action" value="RCPN"/>
    					<input type="hidden" name="Coupon_Code" value="&mvte:coupon:code;"/>
    					<mvt:if expr="NOT ISNULL l.settings:coupon:descrip">
    						Coupon - &mvt:coupon:code;: &mvt:coupon:descrip;
    					<mvt:else>
    						Coupon - &mvt:coupon:code;
    					</mvt:if>
    					<button type="submit" class="button button-mini bg-transparent red align-baseline">Remove</button>
    				</form>
    			</div>
    		</div>
    	</mvt:foreach>
    </div>
    <div>
    	<div class="column whole medium-two-thirds np">
    		<mvt:item name="customfields" param="Read_Basket('continue_shopping', l.settings:urls:continue_shopping)"/>
    		<mvt:if expr="l.settings:urls:continue_shopping">
    			<a href="&mvte:urls:continue_shopping;" class="button button-medium button-small-font bg-transparent blue uppercase">Continue Shopping</a>
    		<mvt:else>
    			<a href="&mvte:urls:SFNT:auto;" class="button button-medium button-small-font bg-transparent blue uppercase">Continue Shopping</a>
    		</mvt:if>
    		<mvt:comment>
    			<a href="&mvte:urls:WISH:secure_sep;Action=MAWL" class="button button-medium button-small-font bg-transparent blue uppercase">Move All to Wish List</a>
    		</mvt:comment>
    		<button type="button" class="button button-medium button-small-font bg-transparent blue uppercase js-slide-toggle" data-target="#js-coupon-form">Redeem Coupon</button>
    		<form method="post" action="&mvte:urls:BASK:rr;" class="nm <mvt:if expr=" g.Action NE 'ACPN'">js-hide</mvt:if>" id="js-coupon-form">
    			<input type="hidden" name="Action" value="ACPN"/>
    			<br>
    			<div class="column half large-one-fourth nlp">
    				<input type="text" name="Coupon_Code" id="l-coupon-code" class="input" placeholder="Enter coupon code.." value="&mvte:global:Coupon_Code;">
    			</div>
    			<div class="column one-fourth large-one-eighth np">
    				<button class="button button-medium button-small-font bg-transparent blue uppercase">Redeem</button>
    			</div>
    			<div class="breaker clear clearfix"></div>
    		</form>
    	</div>
    	<div class="column whole medium-one-third np">
    		<mvt:comment>
    			<div class="all-hidden medium-all-shown basket-header-row align-center">Cart Summary</div>
    		</mvt:comment>
    		<mvt:foreach iterator="charge" array="basket:charges">
    			<div class="row basket-charge-row">
    				<div class="column half"><em>&mvt:charge:descrip;:</em></div>
    				<div class="column half align-right">&mvt:charge:formatted_disp_amt;</div>
    			</div>
    		</mvt:foreach>
    		<mvt:item name="shipestimate"/>
    		<div class="row basket-charge-row">
    			<div class="column half"><strong>TOTAL:</strong></div>
    			<div class="column half align-right"><strong>&mvt:basket:formatted_total;</strong></div>
    		</div>
    		<div class="breaker"></div>
    		<hr noshade/>
    		<a href="&mvte:urls:OINF:secure;" title="Proceed to Secure Checkout" class="button button-block button-square button-medium bg-green white uppercase">Checkout</a>
    	</div>
    </div>
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #17
      The update button is working great now - thank you. But the Remove button still doesn't work.

      Comment


        #18
        Looks like I had a typo in the remove function. Change 'Basket_Item' to 'Basket_Line' and it should be all good.
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #19
          Thank you. It seems to be working now.

          Comment


            #20
            I am having this same problem. Minimum and Maximum Quantity seems to work on the PROD page, but I can break the rules on the BASK page and it does not adjust. I am trying these solutions, but they are breaking the page. Levels ReadyTheme, Weiland Minimum and Maximum Quantity, version 5.0120. Merchant 9.00064. Here is my BASK code:

            Code:
            <mvt:if expr="g.Action EQ 'RGRP'">
                <mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
                <mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
                <mvt:assign name="g.Restore_Link" value="miva_variable_value('Restore_Link' $ g.Restore_Counter)" />
                <div class="message message-info">
                    <b>&mvte:global:Restore_Name;</b> has been removed from your cart. <a href="&mvte:global:Restore_Link;">Undo?</a>
                </div>
                <mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
            </mvt:if>
            <mvt:if expr="l.settings:basket:empty">
                <h5 class="column whole message message-info">Your shopping cart is currently empty.</h5>
                <p class="column whole">
                    <a href="&mvte:urls:SFNT:auto;" class="button button-square">Start Shopping</a>
                </p>
                <mvt:exit />
            </mvt:if>
            <div class="column whole medium-all-hidden cart-summary">
                <span class="column half"><strong>Cart Subtotal:</strong></span>
                <span class="column half align-right"><strong>&mvt:basket:formatted_total;</strong></span>
                <br class="clear" />
                <hr noshade />
                <p class="align-center"><a href="&mvt:global:secure_sessionurl;Screen=OINF&Store_Code=&mvte:store:code;" title="Proceed to Secure Checkout" class="button button-block button-square button-medium bg-green white uppercase">Checkout</a></p>
                <div class="basket-header-row align-center">Cart Summary</div>
            </div>
            <div class="column whole cart-contents">
                <div class="row hide medium-show basket-header-row">
                    <div class="column five-eighths">Product</div>
                    <div class="column one-eighth align-center">Quantity</div>
                    <div class="column one-eighth align-right">Price</div>
                    <div class="column one-eighth align-right">Subtotal</div>
                </div>
                <mvt:foreach iterator="group" array="basket:groups">
                    <mvt:assign name="l.settings:group:restore:link" value="l.settings:urls:BASK:auto_sep $ 'Action=ADPR&Product_Code=' $ l.settings:group:product:code $ '&Quantity=' $ l.settings:group:quantity" />
                    <div class="row basket-product-row">
                        <div class="column one-fourth align-center">
                            <mvt:if expr="l.settings:group:imagetypes:main">
                                <img src="&mvte:group:imagetypes:main;" alt="&mvt:group:name;">
                            <mvt:else>
                                &nbsp;
                            </mvt:if>
                        </div>
                        <div class="column three-fourths medium-three-eighths">
                            <h4 class="nm">
                                <a href="&mvte:group:link;" title="&mvt:group:name;">
                                    &mvt:group:name;
                                    <mvt:if expr="l.settings:group:upsold">&nbsp;(Special Offer)</mvt:if>
                                </a>
                            </h4>
                            <div class="basket-product-details">
                                <p>Code: &mvt:group:code;</p>
                                <mvt:foreach iterator="option" array="group:options">
                                    <mvt:assign name="l.settings:group:option_counter" value="l.settings:group:option_counter + 1" />
                                    <p>
                                        <mvt:if expr="l.settings:option:option_id">
                                            <mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:opt_code" />
                                            &mvt:option:attr_prompt;: &mvt:option:opt_prompt;
                                        <mvt:elseif expr="NOT ISNULL l.settings:option:data">
                                            <mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:data" />
                                            &mvt:option:attr_prompt;: &mvt:option:data;
                                        <mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
                                            <mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:option:attr_code $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:data_long" />
                                            &mvt:option:attr_prompt;: &mvt:option:data_long;
                                        <mvt:else>
                                            &mvt:option:attr_prompt;
                                        </mvt:if>
                                    </p>
                                </mvt:foreach>
                                <mvt:foreach iterator="discount" array="group:discounts">
                                    <mvt:if expr="l.settings:discount:display">
                                        <p>&mvt:discount:descrip;: &mvt:discount:formatted_discount;</p>
                                    </mvt:if>
                                </mvt:foreach>
                                <mvt:foreach iterator="discount" array="option:discounts">
                                    <mvt:if expr="l.settings:discount:display">
                                        <p>&mvt:discount:descrip;: &mvt:discount:formatted_discount;</p>
                                    </mvt:if>
                                </mvt:foreach>
                                <mvt:if expr="l.settings:group:product:id">
                                    <p><a href="&mvte:urls:WISH:secure_sep;Action=MPWL&Group_ID=&mvta:group:group_id;">+ Add To Wishlist</a></p>
                                </mvt:if>
                            </div>
                        </div>
                        <div class="breaker clear medium-all-hidden"></div>
                        <div class="column half x-small-offset-one-fourth x-small-one-fourth medium-offset-none medium-one-eighth">
                            <mvt:if expr="l.settings:group:upsold">
                                <p class="align-center">&mvt:group:quantity;</p>
                            <mvt:else>
                                <form method="post" action="&mvte:urls:BASK:rr;" class="nm">
                                    <input type="hidden" name="Action" value="QTYG" />
                                    <input type="hidden" name="Basket_Group" value="&mvte:group:group_id;" />
                                    <input type="hidden" name="Old_Screen" value="BASK" />
                                    <input type="hidden" name="Offset" value="&mvte:global:Offset;" />
                                    <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
                                    <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
                                    <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
                                    <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
                                    <input type="hidden" name="Restore_Name" value="&mvt:group:name;">
                                    <input type="hidden" name="Restore_Link" value="&mvte:group:restore:link;">
                                    <mvt:comment><input type="tel" name="Quantity" value="&mvt:group:quantity;" class="align-center" /></mvt:comment>
                                    <input type="tel" name="Quantity" value="&mvt:group:quantity;" class="align-center float-left increase-decrease-input" data-min="0">
                                    <div class="increase-decrease-wrap float-left">
                                        <span class="button increase-quantity js-increase-quantity" unselectable="on" data-icon="&#x4c;"></span>
                                        <span class="button decrease-quantity js-decrease-quantity" unselectable="on" data-icon="&#x4b;"></span>
                                    </div>
                                    <button type="submit" class="js-hide button button-small button-small-font js-update-quantity"><span data-icon="&#xe02a;" class="hide medium-inline"></span>Update</button>
                                </form>
                                <form method="post" action="&mvte:urls:BASK:rr;" class="nm hide" class="">
                                    <input type="hidden" name="Action" value="RGRP" />
                                    <input type="hidden" name="Restore_Name" value="&mvt:group:name;">
                                    <input type="hidden" name="Restore_Link" value="&mvte:group:restore:link;">
                                    <input type="hidden" name="Basket_Group" value="&mvte:group:group_id;" />
                                    <input type="hidden" name="Offset" value="&mvte:global:Offset;" />
                                    <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
                                    <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
                                    <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
                                    <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
                                    <button type="submit" class="button button-mini button-block bg-transparent remove-item"><strong class="hide medium-inline">&times;</strong> Remove</button>
                                </form>
                            </mvt:if>
                        </div>
                        <div class="column hide medium-show medium-one-eighth align-right">
                            <mvt:if expr="l.settings:group:price EQ '0' OR l.settings:group:price EQ '0.00' OR l.settings:group:price EQ 0.00 OR l.settings:group:price EQ 0">
                                <p>&nbsp;</p>
                            <mvt:else>
                                <p>&mvt:group:formatted_base_price;</p>
                            </mvt:if>
                            <br>
                            <mvt:foreach iterator="option" array="group:options">
                                <mvt:if expr="l.settings:option:base_price">
                                    <p><small>&mvt:option:formatted_base_price;</small></p>
                                </mvt:if>
                            </mvt:foreach>
                        </div>
                        <div class="column half medium-one-eighth medium-align-right">
                            <p class="medium-all-hidden"><strong>Item Subtotal</strong></p>
                            <mvt:if expr="l.settings:group:subtotal_base_price NE l.settings:group:subtotal">
                                <s>&mvt:group:formatted_subtotal_base_price;</s><br>
                            </mvt:if>
                            <p>&mvt:group:formatted_subtotal;</p>
                            <mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
                                <mvt:if expr="l.settings:option:subtotal_base_price NE l.settings:option:subtotal">
                                    <s><small>&mvt:option:formatted_subtotal_base_price;</small></s><br>
                                </mvt:if>
                                <p><small>&mvt:option:formatted_subtotal;</small></p>
                            </mvt:if>
                        </div>
                    </div>
                </mvt:foreach>
                <mvt:foreach iterator="coupon" array="basket:coupons">
                    <div class="row basket-product-row">
                        <div class="column whole">
                            <form method="post" action="&mvte:urls:BASK:rr;" class="nm">
                                <input type="hidden" name="Action" value="RCPN" />
                                <input type="hidden" name="Coupon_Code" value="&mvte:coupon:code;" />
                                <mvt:if expr="NOT ISNULL l.settings:coupon:descrip">
                                    Coupon - &mvt:coupon:code;: &mvt:coupon:descrip;
                                <mvt:else>
                                    Coupon - &mvt:coupon:code;
                                </mvt:if>
                                <button type="submit" class="button button-mini bg-transparent red align-baseline">Remove</button>
                            </form>
                        </div>
                    </div>
                </mvt:foreach>
            </div>
            <div>
                <div class="column whole medium-two-thirds np">
                    <mvt:item name="customfields" param="Read_Basket('continue_shopping', l.settings:urls:continue_shopping)" />
                    <mvt:if expr="l.settings:urls:continue_shopping">
                        <a href="&mvte:urls:continue_shopping;" class="button button-medium button-small-font bg-transparent blue uppercase">Continue Shopping</a>
                    <mvt:else>
                        <a href="&mvte:urls:SFNT:auto;" class="button button-medium button-small-font bg-transparent blue uppercase">Continue Shopping</a>
                    </mvt:if>
                    <a href="&mvte:urls:WISH:secure_sep;Action=MAWL" class="button button-medium button-small-font bg-transparent blue uppercase">Move All to Wish List</a>
                    <button type="button" class="button button-medium button-small-font bg-transparent blue uppercase js-slide-toggle" data-target="#js-coupon-form">Redeem Coupon</button>
                    <br /><br /><div style ="width: 50%;"><form method="post" action="&mvt:global:sessionurl;" id="js-coupon-form">
            <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
            <input type="hidden" name="Screen" value="&mvte:global:Screen;">
            <input type="hidden" name="Action" value="NEW">
            <input type="hidden" name="SubScreen" value="CouponRd">
            <input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;">
            <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;">
            <input type="hidden" name="Offset" value="&mvte:global:Offset;">
            <input type="text" name="coupon_id55" value="" size="15">
            <input type="submit" name="cpn" value="Redeem Coupon">
            <font color="red" size="-1">
            <mvt:item name="couponrd" param="misc" />
            </font>
                    </form></div>
                </div>
                <div class="column whole medium-one-third np">
                    <mvt:comment><div class="all-hidden medium-all-shown basket-header-row align-center">Cart Summary</div></mvt:comment>
                    <mvt:foreach iterator="charge" array="basket:charges">
                        <div class="row basket-charge-row">
                            <div class="column half"><em>&mvt:charge:descrip;:</em></div>
                            <div class="column half align-right">&mvt:charge:formatted_disp_amt;</div>
                        </div>
                    </mvt:foreach>
                    <mvt:item name="shipestimate" />
                    <div class="row basket-charge-row">
                        <div class="column half"><strong>TOTAL:</strong></div>
                        <div class="column half align-right"><strong>&mvt:basket:formatted_total;</strong></div>
                    </div>
                    <div class="breaker"></div>
                    <hr noshade />
                    <a href="&mvte:urls:OINF:secure;" title="Proceed to Secure Checkout" class="button button-block button-square button-medium bg-green white uppercase">Checkout</a>
                </div>
            </div>

            Comment


              #21
              I got this fixed, the script above does indeed work, it was a mistake on my end.

              Comment


                #22
                I am able to get things 'working' well enough on the basket page with using miva's built in volume pricing, as well as the minimum/maximum module by emporium plus by changing all the 'group' and 'groups' to 'item' and 'items'. Except for one thing: in the spot that is suppose to show the total discounted amount - under the product name - it is only showing the discount amount of one item. Since the total regular retail amount is shown as a strike through, along with the new total with discounts applied, it would seem it would still be possible to show this amount correctly? I am just not sure how - any ideas? See basket screen shot.

                Comment


                  #23
                  The default Levels installation will calculate the discount with the quantity of the products. I believe the discount calculation is based around the group/groups array. Changing that array to item/items may be causing the issue; especially if the discount array was not updated to item:discounts.
                  Matt Zimmermann

                  Miva Web Developer
                  Alchemy Web Development
                  https://www.alchemywebdev.com
                  Site Development - Maintenance - Consultation

                  Miva Certified Developer
                  Miva Professional Developer

                  https://www.dev4web.net | Twitter

                  Comment


                    #24
                    I am actually using the Base readytheme for this project. And the calculation is definitely based on group/groups because if I change the basket template back to default the calculation works properly. I was just wondering if there was a work around to get the right calculation since I have to use item/items for the min/max module to work.

                    Comment


                      #25
                      It looks like this is only a visual issue as the calculations for the totals are correct. To get the compiled discount amounts, in your discount loop, try replacing this:
                      Code:
                      <div class="item-discount">&mvt:discount:descrip;: &mvt:discount:formatted_discount;</div>
                      with this:
                      Code:
                      <mvt:do name="l.settings:compiled_formatted_discount" file="g.Module_Root $ g.Store:currncy_mod:module" value="CurrencyModule_AddFormatting(g.Store:currncy_mod, l.settings:discount:discount * l.settings:item:quantity)" />
                      <div class="item-discount">&mvt:discount:descrip;: &mvt:compiled_formatted_discount;</div>
                      Matt Zimmermann

                      Miva Web Developer
                      Alchemy Web Development
                      https://www.alchemywebdev.com
                      Site Development - Maintenance - Consultation

                      Miva Certified Developer
                      Miva Professional Developer

                      https://www.dev4web.net | Twitter

                      Comment


                        #26
                        That worked beautifully - thank you.

                        Comment

                        Working...
                        X