public static function render_checkout_progress($step_number, $has_no_account) { $steps = array(TEXT_ORDER_STEPS_1, TEXT_ORDER_STEPS_2, TEXT_ORDER_STEPS_3, TEXT_ORDER_STEPS_4); if ($has_no_account) { array_unshift($steps, TEXT_ORDER_STEPS_BILLING); } $output = "<div class='row text-center order-steps'>\n"; foreach ($steps as $index => $step) { if ($index == 0 && $has_no_account) { $class = 'col-sm-2 col-sm-offset-1'; } elseif ($has_no_account) { $class = 'col-sm-2'; } else { $class = 'col-sm-3'; } if ($step_number >= $index + 1) { $class .= ' text-primary'; } $icon = ''; if ($step_number == $index + 1) { $icon = BootstrapUtils::glyphicon('arrow-down'); } $output .= "<div class='{$class}'>{$icon}<br />{$step}</div>\n"; } $output .= "</div>\n"; $class = $has_no_account ? 'col-sm-10 col-sm-offset-1' : 'col-sm-12'; $completed = 100 / count($steps) * $step_number; $output .= "<div class='row'><div class='{$class}'><div class='progress'>\n" . "<div class='progress-bar' role='progressbar' aria-valuenow='{$completed}' " . "aria-valuemin='0' aria-valuemax='100' style='width:{$completed}%;'></div>\n" . "</div></div></div>"; return $output; }
public static function product_icon_legend() { global $template, $current_page; $product_icons = BootstrapUtils::sese_product_icons($template, $current_page); $content = "<ul class='media-list'>"; foreach ($product_icons as $icon) { $content .= "<li class='media'>" . "<div class='media-left media-middle'>" . "<img class='media-object' src='{$icon['image']}' alt='{$icon['title']}' title='{$icon['description']}'>" . "</div>" . "<div class='media-body'>{$icon['description']}</div>" . "</li>"; } $content .= "</ul>"; return $content; }
</li> <?php } if (DEFINE_PAGE_3_STATUS <= '1') { ?> <li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>'; ?> </li> <?php } if (DEFINE_PAGE_4_STATUS <= '1') { ?> <li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>'; ?> </li> <?php } ?> </ul></li> </ul> </div> <p class='clearfix'><?php echo BootstrapUtils::back_link(); ?> </p> </div>
/** Render the row of buttons */ public static function buttons() { $back_link = zen_back_link(true); $left_buttons = "<a href='{$back_link}' class='btn btn-success'>" . "« " . BUTTON_CONTINUE_SHOPPING_ALT . "</a>"; if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') { $shipping_link = zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR); $left_buttons .= " <a href=\"javascript:popupWindow('{$shipping_link}')\" class='btn btn-warning'>" . BootstrapUtils::glyphicon('globe') . " " . BUTTON_SHIPPING_ESTIMATOR_ALT . "</a>"; } $checkout_link = zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); $right_buttons = "<a href='{$checkout_link}' class='btn btn-primary'>" . BootstrapUtils::glyphicon('shopping-cart') . " " . BUTTON_CHECKOUT_ALT . "</a>"; if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) { $right_buttons = "<button type='submit' class='btn btn-success'>" . BootstrapUtils::glyphicon('refresh') . " " . BUTTON_UPDATE_ALT . "</button>\n" . $right_buttons; } return "<div class='clearfix'><div class='pull-left'>{$left_buttons}</div>" . "<div class='pull-right'>{$right_buttons}</div></div>"; }
public static function add_to_cart() { global $flag_show_product_info_in_cart_qty, $products_qty_box_status; global $products_quantity_order_max, $_GET, $display_qty; $button = ''; $show_qty_in_cart = $flag_show_product_info_in_cart_qty == 1 && $_SESSION['cart']->in_cart($_GET['products_id']); if ($show_qty_in_cart) { $cart_quantity = $_SESSION['cart']->get_quantity($_GET['products_id']); $button .= '<p class="text-center" id="in-cart-text"><small>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $cart_quantity . '</small></p>'; } $submit_button = '<button type="submit" class="btn btn-primary">' . BUTTON_IN_CART_ALT . '</button>'; $hide_quantity_input = $products_qty_box_status == 0 || $products_quantity_order_max == 1; if ($hide_quantity_input) { // Default to a quantity of 1 $button .= $submit_button . zen_draw_hidden_field('cart_quantity', 1) . zen_draw_hidden_field('products_id', (int) $_GET['products_id']); } else { $quantity = zen_get_buy_now_qty($_GET['products_id']); $min_quantity = zen_get_products_quantity_min_units_display((int) $_GET['products_id']); $hidden = zen_draw_hidden_field('products_id', (int) $_GET['products_id']); $button .= <<<HTML <div class='input-group'> <input class='form-control' type='text' name='cart_quantity' value='{$quantity}' maxlength='6' size='3' /> <span class='input-group-btn'>{$submit_button}</span> </div> {$min_quantity} {$hidden} HTML; } $display_button = zen_get_buy_now_button($_GET['products_id'], $button); $display_button = BootstrapUtils::clean_buy_now_button($display_button, ''); if ($display_button != '' || $display_qty != '') { return "<div id='cart-add'>{$display_qty} {$display_button}</div>"; } }
for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) { $lc_class = $lc_text = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_NAME': $lc_class = 'product-name'; $icons = BootstrapProductListing::product_icon_html($sese_icons, $listing); $product_description = zen_trunc_string(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION); $lc_text = "<h4 class='itemTitle'><a href='{$product_link}'><b>" . "{$listing->fields['products_name']}</b></a>{$icons}</h4>" . "<div class='hidden-xs listingDescription'>{$product_description}</div>\n" . "<div class='visible-xs'>{$product_image}</div>\n"; break; case 'PRODUCT_LIST_PRICE': $lc_price = "<div class='text-center product-price'><b>" . zen_get_products_display_price($listing->fields['products_id']) . "</b></div>\n"; $lc_text = $lc_price; $the_button = BootstrapProductListing::product_cart_button($listing, $product_link); $products_link = "<a href='{$product_link}'>" . MORE_INFO_TEXT . '</a>'; $buy_now_button = zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . zen_get_products_quantity_min_units_display($listing->fields['products_id']); $lc_text .= BootstrapUtils::clean_buy_now_button($buy_now_button, $product_link); $has_free_shipping = zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') && zen_get_product_is_always_free_shipping($listing->fields['products_id']); if ($has_free_shipping) { $lc_text .= TEXT_PRODUCT_FREE_SHIPPING_ICON . "<br />"; } if (isset($listing->fields['products_model'])) { $lc_text .= "<div class='text-center'><small class='item-number'><i>Item # {$listing->fields['products_model']}" . "</i></small></div>"; } $form_action = zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'); $lc_text = zen_draw_form('multiple_products_cart_quantity', $form_action, 'post', 'enctype="multipart/form-data"') . $lc_text . "</form>"; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = $listing->fields['products_quantity']; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = $listing->fields['products_weight'];
$ttitle .= 'Bulk '; } $title = 'All ' . $ttitle . 'Products'; $list_box_contents = array(); $listing_sql = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,\n p.products_date_added, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,\n p.product_is_always_free_shipping, p.products_qty_box_status,\n p.master_categories_id, i.products_id, i.is_organic, i.is_heirloom, i.is_southern, i.is_eco\n FROM " . TABLE_PRODUCTS . " p, sese_products_icons i, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n WHERE p.products_status = 1\n AND p.products_id = pd.products_id\n AND p.products_id = i.products_id\n AND pd.language_id = :languageID " . $restrict . $order_by; $listing_sql = $db->bindVars($listing_sql, ':languageID', $_SESSION['languages_id'], 'integer'); $column_list = array('PRODUCT_LIST_IMAGE', 'PRODUCT_LIST_NAME', 'PRODUCT_LIST_PRICE'); ?> <div class='page-header'><h1 id="allProductsDefaultHeading"><?php echo $title; ?> </h1></div> <?php echo '<div class="clearfix"><div class="pull-right">' . BootstrapUtils::render_page_count_links() . '</div><div class="pull-left">'; require $template->get_template_dir('/tpl_modules_listing_display_order.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_modules_listing_display_order.php'; echo '</div></div>'; ?> <br class="clearBoth" /> <?php /** * display the new products */ require $template->get_template_dir('tpl_modules_product_listing.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/' . 'tpl_modules_product_listing.php'; ?> </form>
<div id="checkoutShipto"> <?php if ($displayAddressEdit) { ?> <div class="pull-right"> <a href='<?php echo $editShippingButtonLink; ?> ' class='btn btn-default'> <?php echo BUTTON_CHANGE_ADDRESS_ALT; ?> </a></div> <?php } echo BootstrapUtils::render_address($_SESSION['customer_id'], $_SESSION['sendto']); ?> </div> <p class='text-center text-info'><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION; ?> </p> </div> <?php if (zen_count_shipping_modules() > 0) { if (zen_not_null(TABLE_HEADING_SHIPPING_METHOD)) { ?> <h2 id="checkoutShippingHeadingMethod"><?php echo TABLE_HEADING_SHIPPING_METHOD; ?>
<?php /** Set the Content of the SESE Product Icons Sidebox */ $blank_icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII="; $product_icons = BootstrapUtils::sese_product_icons($template, $current_page_base); $content = <<<HTML <ul class='media-list'> <!-- All --> <li class='media'> <a href="index.php?main_page=products_all"> <div class='media-left media-middle'> <img class='media-object' src="{$blank_icon}" width="32" height="26" /> </div> <div class='media-body'> <h5 class='media-heading'>All Products</h5> </div> </a> </li> <!-- Bulk --> <li class='media'> <a href="index.php?main_page=products_all&bulk=1"> <div class='media-left media-middle'> <img class='media-object' src="{$blank_icon}" width="32" height="26" /> </div> <div class='media-body'> <h5 class='media-heading'>Bulk Products</h5> </div> </a> </li>
role='button' aria-haspopup='true' aria-expanded='false'> <?php echo $root_category['name']; ?> <span class='caret'></span> </a> <ul class='dropdown-menu <?php echo $columns ? "multi-column columns-{$columns}" : ''; ?> '> <?php echo $columns ? '<div class="row">' : ''; $child_index = 0; foreach ($root_category['children'] as $child) { echo $columns && ($child_index == 0 || $child_index % $children_per_column == 0) ? "<div class='col-sm-{$column_width}'><ul class='multi-column-dropdown'>" : ''; $subcategory_url = BootstrapUtils::category_url(array($root_category['id'], $child['id'])); ?> <li <?php if ($child['active']) { echo 'class="active"'; } ?> > <a href="<?php echo $subcategory_url; ?> "><?php echo $child['name']; ?> </a> </li><?php
<?php /** Set the Content of the subscribe Sidebox */ $text = SUBSCRIBE_SIDEBOX_TEXT; $button_text = BootstrapUtils::glyphicon('envelope') . " " . SUBSCRIBE_SIDEBOX_BUTTON_TEXT; $content = <<<HTML <p>{$text}</p> <form action="https://sendy.southernexposure.com/subscribe" method="POST" accept-charset="utf-8" target="_blank"> <input type="hidden" name="list" value="EXGP5iaxXvU4tH7fWWopIQ"/> <div class='form-group'> <input class='form-control' type="email" name="email" id="email" placeholder="Enter your email address" /> </div> <div class='form-group'> <button class='form-control btn btn-primary' type="submit" name="submit" id="submit"> {$button_text} </button> </div> </form> HTML ;