Jump to content

Shopping Cart


turquito

Recommended Posts

Hi All

 

I have 3 question but all in reference to Shopping-Cart.tpl, I use PS 1.6.1.10. I attach the screen capture and inside this one I set my questions, each one have a diferent color.

 

My questions are:

1.- I did my personal Discount Rules, but when I use the buttom +/- this value dont change. This change happen only if I refesh the page. How can I do that, without refresh the page?, if the other field how Total prducts and Total change automatically. All my code is into ,tfoot>, Same case with Total Weight.

 

<tfoot>

{assign var='totalQty' value=0}
{assign var='totalReductonPercent' value=0}
{assign var='totalReductonValue' value=0}
{assign var='totalWeight' value=0}
 
{*
*
******** VALUE A VARIABLES ASSIGNATION ***********
*
*}
{foreach $products as $product}
{assign var='totalReductonValue' value=$totalReductonValue + $product.price_without_specific_price}
{assign var='totalQty' value=$totalQty + $product.quantity}
{/foreach}
 
{*
*
******** DISCOUNT RULES ACCORDING QTY ***********
*
*}
{if $productNumber>=16} 
{assign var='totalReductonPercent' value=20}
{else} 
{if $productNumber>=11} 
{assign var='totalReductonPercent' value=15}
{else}
{if $productNumber>=6} 
{assign var='totalReductonPercent' value=10}
{else}
{if $productNumber>=3} 
{assign var='totalReductonPercent' value=5}
{/if}
{/if}
{/if}
{/if}
.
.
.
{*
*
****** TOTAL DISCOUNT *****
*
*}
<tr class="cart_total_discount">
<td colspan="3" class="text-right">
{l s='Total discount for ('}
<span class="footer-counter">
<span id="summary_products_quantity">{$productNumber} 
{if $productNumber == 1}
{l s=') Carton: '}
{else}
{l s=') Cartons: '}
{/if}
</span>
</span>
</td>
<td colspan="2" class="price" id="total_discount">
{assign var='totalReductonValue' value=$total_products * ($totalReductonPercent/100)}
{convertPrice price=$totalReductonValue}<br>
<span class="price-percent-reduction small">
{($totalReductonPercent)|round|string_format:"%d"}%
</span>
{*<br>*}
</td>
</tr>
.
.
.
 
{*
*
****** TOTAL ******
*}
<tr class="cart_total_price">
<td colspan="3" class="total_price_container text-right">
<span>{l s='Total :'}</span>
</td>
{if $use_taxes}
<td colspan="2" class="price" id="total_price_container">
<span id="total_price">
{displayPrice price=$total_price_without_tax-$totalReductonValue}
</span>
</td>
{else}
<td colspan="2" class="price" id="total_price_container">
<span id="total_price">
{displayPrice price=$total_price-$totalReductonValue}
</span>
</td>
{/if}
</tr>
 
{*
*
****** TOTAL WEIGHT ORDER *****
*
*}
<tr class="cart_total_delivery">
<td colspan="1" class="text-right">
{l s='Total Weight: '}
</td>
<td colspan="2" class="price">
{$cart->getTotalWeight()} &nbsp{Configuration::get('PS_WEIGHT_UNIT')}
</td>
</tr>
 

</tfoot>

 

2.- I think that is complecate:

      How you see I have my personal Discount rules, what happen when I have products in SALE, I dont want that this product enter into discount rules because this one is in SALE. If you see the picture the shopping cart sum all and applicate the SALE and Discount rules for this product. I was thinking create two new var, one for product in SALE and other for normal products. Add new row into <tfoot> that will be Total product SALE, but how I know what product is in SALE?

 

3.- I wish change the Avail column by Shipping (Box Dimensions), Height x Width x Depth and Volumetric Calc.

 

Important, All this modification must be in PAYMENT FORM, because all this modification don't show in this one. ( see second pic attach)

 

I appreciate your comments.

 

Adolfopost-1337346-0-90927700-1481313483_thumb.pngpost-1337346-0-19457900-1481318029_thumb.png

Edited by turquito (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...