Hi KK,
Thank you for pointing me in the right direction. I was able to get every configuration option in cart/config.php into the couch admin.

Here is the example specifically for ship_by_order_total, other variables from the config.php can be moved to the couch admin by similar code in the other PHP functions.
First in the cart/index.php (products template), add:
- Code: Select all
<cms:globals>
<cms:editable name='e_cus_shipping_by_order_total' type='message' order='1'>
<b>Ship by order total:</b><br>
<font color='#777'>Set the option below if you want to set up a sliding scale of shipping charges based on the order’s total cost.
For example, if you charge $6 for orders between $1 to $50, $3 for orders between $51 to $100, and free shipping for orders worth $101 and more, set it to</font><br>
<font color='blue'><pre>[ 0=6 | 50=3 | 100=0 ]</pre></font><br>
<font color='#777'>where the string above stands for '6 for more than 0, 3 for more than 50, 0 for more than 100'</font><br>
<font color='#777'>To set up the shipping charges as a percentage of order's total cost (as opposed to fixed values as we did above), add a '%' after the string e.g.</font><br>
<font color='blue'><pre>[ 0=6 | 50=3 | 100=0 ]%</pre></font><br>
<font color='#777'>which now makes it 6% of the cart's total for orders over $0, 3% of the cart's total for orders over $50 and 0% (free) for over $100.</font>
</cms:editable>
<cms:editable name='cus_shipping_by_order_total' label=':' type='text' validator='regex=/\[\[?([^\]]*)\](\]?)\s*(%?)/' order='2' />
</cms:globals>
Then visit your cart/index.php as superadmin.
Then visit globals and enter the string for the ship by order total and save.
In your cart.ex.php
On line 88 change:
- Code: Select all
global $KSESSION;
to
- Code: Select all
global $KSESSION, $FUNCS;
On 111 change:
- Code: Select all
$scale_order_total = $this->get_config( 'shipping_by_order_total' );
to
- Code: Select all
//$scale_order_total = $this->get_config( 'shipping_by_order_total' );
$html = "<cms:get_global 'cus_shipping_by_order_total' masterpage='cart/index.php' />";
$scale_order_total = $FUNCS->embed( $html, $is_code=1 );
Hope someone finds this useful.