There are a few tools that will make your life easier when customizing your site. If you don't have them already, install an FTP program like Filezilla and a file editing program like Notepad++ (both free from www.sourceforge.net). (Notepad is not the same as Notepad++.)
You should have a full set of Zen Cart files on your home computer. If you make edits to those copies and then send them to your site, you will always have an up-to-date backup.
Open /includes/modules/product_listing.php, and save as /includes/modules/your_template/product_listing.php. Then find this section around line 146
PHP Code:
$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '<br />' . (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']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
break;
case 'PRODUCT_LIST_QUANTITY':
Replace <br /> in one place with
<div class="listingAdd">
and add
$lc_text .= '</div>';
to get
PHP Code:
$lc_text .= '<div class="listingAdd">' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '<br />' . (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']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
$lc_text .= '</div>';
Now you have a handle to move the add/qty box with.
Add to your stylesheet
Code:
.listingAdd {
float: right;
width: 4.0em;
}
Bookmarks