Price tab contrib hey this is a grad add on
Just made a tab for priccing and atributes as well as the add to cart box add
Add
Code:
$price_tabs = true; // Puts the Price info in the tab
$price_tabs_name = 'Pricing'; // If using the tabbed view, set the title
to the foist commented block
Add
Code:
//price tab, tab or not
if ($price_tabs == true) {
echo '<div id="'.$g.'" onclick="org.ditchnet.jsp.TabUtils.tabClicked(event);" class="ditch-tab ditch-unfocused">';
echo '<span class="ditch-tab-bg-left"></span><a href="" onclick="return false;">'.$price_tabs_name.'</a>';
echo '</div>';
$g++;
}
//price tab tab end
right above the line w/
Code:
echo '<br class="ditch-clear" />'; //prevent tabs from appearing inside the box
and finaly add
Code:
//price tab content
if ($price_tabs == true) {
echo '<div id="'.$a.'" class="ditch-tab-pane" style="display:none;">';
//<!--bof Product Price block -->
echo '<h2 id="productPrices" class="productGeneral">';
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
echo '</h2><!--eof Product Price block --> <!--bof free ship icon -->';
if(zen_get_product_is_always_free_shipping($products_id_current)) {
echo '<div id="freeShippingIcon">'. TEXT_PRODUCT_FREE_SHIPPING_ICON .'</div>';
}
//<!--eof free ship icon -->
//<!--bof Add to Cart Box -->
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
if ($display_qty != '' or $display_button != '') {
echo '<div id="cartAdd">';
echo $display_qty;
echo $display_button;
echo '</div>';
} // display qty and button
} // CUSTOMERS_APPROVAL == 3
//<!--eof Add to Cart Box-->
//<!--bof Attributes Module -->
if ($pr_attr->fields['total'] > 0) {
/**
* display the product atributes
*/
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
}
//<!--eof Attributes Module -->
echo '<br /></div>';
$a++;
}
//end price tab content
Above
Code:
echo '</div>'; //ditch-tab-pane-wrap
In your css dir create a file called 'product_info_display.css' and
enter
Code:
#cartAdd {
float:none;
}
find all of the Bof comments and wrap them w/ an iff statement allont the lines of
PHP Code:
if ($price_tabs == false){
that have the price, attributes and addt to cart box.
JOsh
Bookmarks