fixup display of product and shoppingcart prices
This commit is contained in:
		@ -1,5 +1,5 @@
 | 
				
			|||||||
<tr>
 | 
					<tr>
 | 
				
			||||||
    <td><span class="pull-right"><a class="btn btn-xs btn-danger" title="Remove from cart" href="<?php print fulcrm_shoppingcart_remove_url( $item[ 'id' ] ); ?>"><span class="glyphicon glyphicon-trash"></span></a></span><?php if ( array_key_exists( 'name', $item[ 'd' ] ) ) print nl2br( check_plain( $item[ 'd' ][ 'name' ] ) ); else print check_plain( $item[ 'product' ][ 'name' ] ); ?></td>
 | 
					    <td><span class="pull-right"><a class="btn btn-xs btn-danger" title="Remove from cart" href="<?php print fulcrm_shoppingcart_remove_url( $item[ 'id' ] ); ?>"><span class="glyphicon glyphicon-trash"></span></a></span><?php if ( array_key_exists( 'name', $item[ 'd' ] ) ) print nl2br( check_plain( $item[ 'd' ][ 'name' ] ) ); else print check_plain( $item[ 'product' ][ 'name' ] ); ?></td>
 | 
				
			||||||
    <td class="text-right"><?php print check_plain( $item[ 'product' ][ '_price' ][ 'format_total_net' ] ); ?></td>
 | 
					    <td class="text-right"><?php print ( ( array_key_exists( 'format_item_gross', $item[ 'product' ][ '_price' ] ) && $item[ 'product' ][ '_price' ][ 'format_item_gross' ] ) ? check_plain( $item[ 'product' ][ '_price' ][ 'format_item_gross' ] ) : t('free') ); ?></td>
 | 
				
			||||||
    <td class="text-right"><?php print check_plain( $item[ 'quantity' ] ); ?></td>
 | 
					    <td class="text-right"><?php print check_plain( $item[ 'quantity' ] ); ?></td>
 | 
				
			||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
 | 
				
			|||||||
@ -20,11 +20,16 @@
 | 
				
			|||||||
                Total
 | 
					                Total
 | 
				
			||||||
            </th>
 | 
					            </th>
 | 
				
			||||||
            <th class="text-right">
 | 
					            <th class="text-right">
 | 
				
			||||||
 | 
					                <?php $any = false; ?>
 | 
				
			||||||
                <?php if ( count( $transaction[ '_price' ][ 'total' ] ) ): ?>
 | 
					                <?php if ( count( $transaction[ '_price' ][ 'total' ] ) ): ?>
 | 
				
			||||||
                    <?php foreach ( $transaction[ '_price' ][ 'total' ] as $currency => $price ): ?>
 | 
					                    <?php foreach ( $transaction[ '_price' ][ 'total' ] as $currency => $price ): ?>
 | 
				
			||||||
                        <div><?php print $price[ 'format_total' ]; ?></div>
 | 
					                        <?php if ( $price[ 'gross' ] ): ?>
 | 
				
			||||||
 | 
					                            <?php $any = true; ?>
 | 
				
			||||||
 | 
					                            <div><?php print $currency . ' ' . $price[ 'format_gross' ]; ?></div>
 | 
				
			||||||
 | 
					                        <?php endif; ?>
 | 
				
			||||||
                    <?php endforeach; ?>
 | 
					                    <?php endforeach; ?>
 | 
				
			||||||
                <?php else: ?>
 | 
					                <?php endif; ?>
 | 
				
			||||||
 | 
					                <?php if ( !$any ): ?>
 | 
				
			||||||
                    <em>free</em>
 | 
					                    <em>free</em>
 | 
				
			||||||
                <?php endif; ?>
 | 
					                <?php endif; ?>
 | 
				
			||||||
            </th>
 | 
					            </th>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user