Move price and quantity side by side in product listing
I'm running Zen Cart 1.3.8a and would like to make my product listing clearer by re-orienting the price and quantity so that they sit side-by-side, rather than one on top of another.
As it stands, both these items sit in one column in an ugly and confusing manner. Ideally they would sit in separate columns (not an option in the admin area, so far as I'm aware). :frusty:
My product listing is at: http://www.smptheatre.co.uk/zen/inde...=index&cPath=1
This is how it currently stands:
http://www.smptheatre.co.uk/current.png
This is a mockup of how I would like it to be:
http://www.smptheatre.co.uk/ideal.png
Any suggestions?
Thanks!
Re: Move price and quantity side by side in product listing
- [FONT=Arial][FONT=Arial]In the Admin, go to Configuration > Product Listing – the section labeled ‘Display Product Price/Add to Cart Column Width’ set it to 155px (Play Around with numbers Later. [/FONT][/FONT][FONT=Arial][FONT=Arial]This takes a bit of tweeking to have this fit on one single line – the table itself is of a dynamic width and so any information in the other cells might shift this around.[/FONT][/FONT][FONT=Arial][FONT=Arial])
[/FONT][/FONT] - [FONT=Arial][FONT=Arial]In the file called ‘product_listing.php’ (can be found under includes/modules/product_listing.php) look for:[/FONT][/FONT]
PHP Code:
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
[FONT=Arial][FONT=Arial]Change It To:[/FONT][/FONT]
PHP Code:
case 'PRODUCT_LIST_PRICE':
// Changed By AA TECH DESIGN To Kill Break Between QTY and Price
// $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_price = zen_get_products_display_price($listing->fields['products_id']) ;
$lc_align = 'right';
[FONT=Arial][FONT=Arial]Note the lack of the <br /> tag on the 2nd line.
Now Also Find And Change:[/FONT][/FONT]
PHP Code:
$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']);
With The Following:
PHP Code:
// Removed Break and Added 2 Spaces so the QTY and Price are in one line by AA TECH DESIGN
$lc_text .= ' ' . 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']);
That should do it for you. Good Luck. And Make Backups, Just In Case.
Regards,
AA TECH DESIGN
Re: Move price and quantity side by side in product listing
Awesome, it worked a treat - thanks.
Re: Move price and quantity side by side in product listing
No, Problem. I owe the community more than that. I hope others will find this useful as well.
Re: Move price and quantity side by side in product listing
Dear AATECH or any other problem solver,
We did what you suggested, but somehow our product listing still has breaks and will not show on one line. Also, the product names are linking to individual product pages, which we don't want. We want it to be similar to what emillarsen finally achieved.
http://www.miter-master.com/index.ph...=index&cPath=2
Thank you in advance for any thoughts or suggestions.
Re: Move price and quantity side by side in product listing
Well your fonts are too big and I think your table is causing it to move up a line. Also you difinitley missed something in the instructions we put before... go over it again...
- AA TECH DESIGN
1 Attachment(s)
Re: Move price and quantity side by side in product listing
Dear AATech and others great helpers.
I have same issue.. I following up the same instruction...
price and add button did works and became same line but not the cart "box". cart box is still under the line. I did play around
"Configuration > Product Listing – the section labeled ‘Display Product Price/Add to Cart Column Width" but makes no difference.
Please take a look at my attached photo.
What about the product photo?
Please help me..
thank you.:no:
Re: Move price and quantity side by side in product listing
Dear Digulu,
The problem you are having, just from looking at the picture you attached, is that the width of your site is too narrow, extend it and that should probably fix it....
- AA TECH DESIGN
http://aatechdesign.com
Re: Move price and quantity side by side in product listing
I'd be interested in your posting how you achieved including the discount quantities in the Product Listing ... :smile:
Re: Move price and quantity side by side in product listing
Thank you AATech! Could you please point me out where I can start? I mean I am not sure how to make my site wider since this is a template that I have applied. Could you please tell me which file am I suppose to edit? I am sorry I am not a graphic web or css development experience person. Again, your help is greatly appreciated.
My site is http://digulu.x10hosting.com/store/i...ndex&cPath=1_4
To Ajeh: please take a look at the forum thread # 57740 posted by Rainbow. I just followed the instruction