neaten up templates

master
Marek Isalski 9 years ago
parent d0b137ca59
commit 05d1ee9667

@ -8,17 +8,29 @@
<th>Quantity</th>
</tr>
</thead>
<tbody>
<?php print theme( 'fulcrm_shoppingcart_cart_items', array( 'items' => $cart[ 'shoppingitems' ] ) ); ?>
<?php if ( $cart ): ?>
<tbody>
<?php if ( array_key_exists( 'shoppingitems', $cart ) ) { print theme( 'fulcrm_shoppingcart_cart_items', array( 'items' => $cart[ 'shoppingitems' ] ) ); } ?>
</tbody>
</tbody>
<tfoot>
<tr>
<td><a class="btn btn-success" href="<?php check_plain( variable_get( 'fulcrm_shoppingcart_proceed_url', url('<front>') ) )?>"><?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_text', '' ) ); ?></a></td>
<td>&nbsp;</td>
<td class="text-right"><a class="btn btn-primary" href="<?php print url('fulcrm/checkout'); ?>">Proceed to Checkout</a></td>
</tr>
</tfoot>
<tfoot>
<tr>
<td><a class="btn btn-success" href="<?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_url', url('<front>') ) )?>"><?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_text', '' ) ); ?></a></td>
<td>&nbsp;</td>
<td class="text-right"><a class="btn btn-primary" href="<?php print url('fulcrm/checkout'); ?>">Proceed to Checkout</a></td>
</tr>
</tfoot>
<?php else: ?>
<tbody>
<tr>
<th colspan="3">Your shopping cart is empty!</th>
</tr>
<tr>
<td><a class="btn btn-success" href="<?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_url', url('<front>') ) )?>"><?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_text', '' ) ); ?></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
<?php endif; ?>
</table>

@ -9,10 +9,9 @@
<th>Total</th>
</tr>
</thead>
<tbody>
<?php print theme( 'fulcrm_shoppingcart_transaction_items', array( 'items' => $transaction[ 'lineitems' ] ) ); ?>
<tbody>
<?php if ( array_key_exists( 'lineitems', $transaction ) ) { print theme( 'fulcrm_shoppingcart_transaction_items', array( 'items' => $transaction[ 'lineitems' ] ) ); } ?>
</tbody>
<tfoot>
@ -31,7 +30,7 @@
</th>
</tr>
<tr>
<td><a class="btn btn-success" href="<?php check_plain( variable_get( 'fulcrm_shoppingcart_proceed_url', url('<front>') ) )?>"><?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_text', '' ) ); ?></a></td>
<td><a class="btn btn-success" href="<?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_url', url('<front>') ) )?>"><?php print check_plain( variable_get( 'fulcrm_shoppingcart_proceed_text', '' ) ); ?></a></td>
<td colspan="2">&nbsp;</td>
<td class="text-right"><?php foreach ( ( $transaction[ '_paymentmethods' ][ 'pay' ][ 'preferred' ] + $transaction[ '_paymentmethods' ][ 'pay' ][ 'other' ] ) as $paymentmethod ): ?><a class="btn btn-primary" href="<?php print $paymentmethod[ 'payment_direct_url' ]; ?>"><?php print check_plain( $paymentmethod[ 'name' ] ); ?></a><?php endforeach; ?></td>
</tr>

@ -11,10 +11,9 @@
<th>Total</th>
</tr>
</thead>
<tbody>
<?php print theme( 'fulcrm_shoppingcart_transaction_items', array( 'items' => $transaction[ 'lineitems' ] ) ); ?>
<tbody>
<?php if ( array_key_exists( 'lineitems', $transaction ) ) { print theme( 'fulcrm_shoppingcart_transaction_items', array( 'items' => $transaction[ 'lineitems' ] ) ); } ?>
</tbody>
<tfoot>

Loading…
Cancel
Save