Order of change of "accordion" in cart
The order is:
1 - Use Coupon Code
2 - Shipping
3 - Use Gift Voucher
I want to change to:
1 - Shipping
2 - Use Coupon Code
3 - Use Gift Voucher
Have you tried to define sort order for these modules? They all are on Extension -> Order Totals page.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Yes, even changing the order I want there, the order is not changed in the frontend.thekrotek wrote:Have you tried to define sort order for these modules? They all are on Extension -> Order Totals page.
Well, the code for this part is simple: it takes everything from catalog/extension/total folder and simply creates an array. So they're ordered alphabetically by default: coupon, shipping, voucher. You need to add some kind of sorting for $data['modules'] variable in catalog/controller/checkout/cart.php file. The best way is to set desired sort order in admin and sort the modules array by 'sort_order' index.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
<!---- CHANGE ORDER OF ACCORDION IN CART --->
works like a charm to me OC2.3
Look for this...
in \catalog\view\theme\default\template\checkout\cart.tpl' file
replace ....
<?php if ($modules) { ?>
<h2><?php echo $text_next; ?></h2>
<p><?php echo $text_next_choice; ?></p>
<div class="panel-group" id="accordion">
<?php foreach ($modules as $module) { ?>
<?php echo $module; ?>
<?php } ?>
</div>
<?php } ?>
To this...
<?php if ($modules) { ?>
<h2><?php echo $text_next; ?></h2>
<p><?php echo $text_next_choice; ?></p>
<div class="panel-group" id="accordion">
<?php //foreach ($modules as $module) { ?>
<?php echo $modules[1]; //shipping ?>
<?php echo $modules[0]; //coupon?>
<?php echo $modules[2]; //voucher?>
<?php //} ?>
</div>
works like a charm to me OC2.3
Look for this...
in \catalog\view\theme\default\template\checkout\cart.tpl' file
replace ....
<?php if ($modules) { ?>
<h2><?php echo $text_next; ?></h2>
<p><?php echo $text_next_choice; ?></p>
<div class="panel-group" id="accordion">
<?php foreach ($modules as $module) { ?>
<?php echo $module; ?>
<?php } ?>
</div>
<?php } ?>
To this...
<?php if ($modules) { ?>
<h2><?php echo $text_next; ?></h2>
<p><?php echo $text_next_choice; ?></p>
<div class="panel-group" id="accordion">
<?php //foreach ($modules as $module) { ?>
<?php echo $modules[1]; //shipping ?>
<?php echo $modules[0]; //coupon?>
<?php echo $modules[2]; //voucher?>
<?php //} ?>
</div>
<!--- No comments --->
Who is online
Users browsing this forum: No registered users and 212 guests