Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How can I move the price field to the left

How can I move the price field to the left

Started by amnon_d on 19 Mar 2012, 10:24 AM · Views: 1,296

Results 1 to 2 of 2
19 Mar 2012, 10:24 AM
#1
amnon_d avatar

amnon_d

New Zenner

Join Date:
May 2009
Posts:
12
Plugin Contributions:
0

Post #1 by amnon_d

Hello,
Some people complained to me that the price field in the product listing is too far to the right and away from the picture of the item (which is on the left).
I could not find a way to do it using the admin tool and the only way I managed to do this was by editing the file: ..zencart/includes/modules/product_listing.php
and inserting:
'<br>' . zen_get_products_display_price($listing->fields['products_id']) .

making the line appear like this:

      $lc_text = '<h3 class="itemTitle"><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']) . '">' . $listing->fields['products_name'] . '<br>' .  zen_get_products_display_price($listing->fields['products_id']) . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;

I also changed the line:
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
to:
$lc_price = '<br />';

to stop the price appearing on the right.

Is there a more elegant way to do this?

Thanks,
Amnon.

19 Mar 2012, 10:28 AM
#2
amnon_d avatar

amnon_d

New Zenner

Join Date:
May 2009
Posts:
12
Plugin Contributions:
0

Post #2 by amnon_d

Hello,
Some people complained to me that the price field in the product listing is too far to the right and away from the picture of the item (which is on the left).
I could not find a way to do it using the admin tool and the only way I managed to do this was by editing the file: ..zencart/includes/modules/product_listing.php
and inserting:
'<br>' . zen_get_products_display_price($listing->fields['products_id']) .

making the line appear like this:

      $lc_text = '<h3 class="itemTitle"><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']) . '">' . $listing->fields['products_name'] . '<br>' .  zen_get_products_display_price($listing->fields['products_id']) . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;

I also changed the line:
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
to:
$lc_price = '<br />';

to stop the price appearing on the right.

Is there a more elegant way to do this?

I also posted this under the General category. Only then I saw this category and thought it is more suitable.

Thanks,
Amnon.