<?php 
foreach ($products as $product) {
    ?>
                          <tr>
                            <td valign="top" nowrap="nowrap">
                              <b><?php 
    print $product->qty;
    ?>
 x </b>
                            </td>
                            <td width="98%">
                              <b>
                                <?php 
    if (module_exists('s3_store') && function_exists('get_s3_signed_url')) {
        $original_img_url = get_s3_signed_url($product->title);
    }
    print '<a href="' . $original_img_url . '" target="_blank">' . $product->title . '</a>';
    ?>
 - <?php 
    print $product->total_price;
    ?>
</b>
                              <?php 
    print $product->individual_price;
    ?>
<br />
                              <?php 
    //print t('SKU');
    ?>
 <?php 
Beispiel #2
0
/**
 * Themes the sale completion page.
 *
 * @param $variables
 *   
 * @ingroup themeable
 */
function runmemo_preprocess_uc_cart_complete_sale(&$variables)
{
    foreach ($variables['order']->products as $order => $image) {
        $nid = $image->nid;
        $node = node_load($nid);
        $img_uri[] = $node->uc_product_image['und'][0];
        $img_name[] = $node->uc_product_image['und'][0]['filename'];
    }
    $no_of_image = count($img_uri);
    $output = '<div class="order-complete-title">' . t('Your payment is complete, thank you for your order') . '</div><div class="order-complete-preview">';
    $output .= '<div class="order-sale-description">' . t('Click on the preview to open original size image in the new window') . '</div>';
    $output .= '<table><tr>';
    $j = 0;
    for ($i = 0; $i < $no_of_image; $i++) {
        $resource = $img_name[$i];
        if (module_exists('s3_store') && function_exists('get_s3_signed_url')) {
            $original_img_url = get_s3_signed_url($resource);
        }
        $j++;
        $output .= '<td><a href="' . $original_img_url . '" target="_blank">' . theme("image_formatter", array('item' => $img_uri[$i], 'image_style' => 'search_thumbnail')) . '</a>';
        $output .= '</td>';
        if ($j % 4 == 0) {
            $output .= '</tr><tr>';
        }
    }
    if ($no_of_image < 4) {
        for ($k = 0; $k < 4 - $no_of_image; $k++) {
            $output .= '<td></td>';
        }
    }
    $output .= '</tr></table><div style="clear:both;"></div></div>';
    $variables['message'] = $output;
    return $variables;
}