Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Move qty box to the left of price and remove <br>

Move qty box to the left of price and remove <br>

Locked
This thread is locked. New replies are disabled.
25 Dec 2006, 10:53 PM
#1
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Post #1 by three_sisters

On the product listing page I'd like to move the qty box to the left of the price, so the pricing would look like:

[qty box] @ $6.99 ea. [add to cart image]

*(I'd really like that image to be a plain ol' html submit button that says "add to cart"...)
*
I started fiddling with product_listing.php, but didn't get too far. Is that what I want to be editing? I think I successfully figured out how to remove the <br>, but I couldn't get the qty box moved.

Thanks,
Allison

26 Dec 2006, 12:55 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #3 by ajeh

If you look at the Configuration ... Product Listing ...

0 = OFF and any other value is the Sort Order for each column in the row ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 Dec 2006, 2:09 AM
#4
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Post #4 by three_sisters

Ok, I tried really hard, but I couldn't get the desired effect...

I can change the "price" sort order and the "Display Product Add to Cart Button (0=off; 1=on; 2=on with Qty Box per Product)" sort order. But I can't slip the price IN BETWEEN the qty box and the add to cart button.

Am I missing something?

Any ideas on changing the image to type="submit"?

Thanks a bunch!

26 Dec 2006, 2:21 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

Sorry ... answered too quick this afternoon ... I did not peek to see that you were using an override on the product listing ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 Dec 2006, 6:52 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #7 by ajeh

You can ask here ... just would help if you would state what add-on you are using so that those who use it can help you better ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 Dec 2006, 7:30 PM
#8
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Post #8 by three_sisters

column grid layout -v1.3.6
ZenCart v1.3.6

Sorry to leave out needed info.... I'm still learning all the rules and ropes....
Although, I still haven't figured this out, I am still working on it.... Trial and error... LOTS of error. :|

28 Dec 2006, 12:10 AM
#9
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Post #9 by three_sisters

:clap::rotflmao:

I couldn't be happier!! I did it - and all by myself, too!!! A crash course in PHP, enough knowledge to really goof things up, and violla! - I got it!

So - I've contented myself - it CAN be done! Here's a link to the "closer to finished" product - http://www.threesistersfabric.com/store/books-c-3.html

I took this block of code (which I had already modified slightly to taste):

$lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" />** **' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';and inserted this starting at (and replacing) the bold **  above>  @ ' . zen_get_products_display_price($listing->fields['products_id']) . ' ea.'I also commented out the price that was right below the product description:
** //
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . ' ';So! Now, if I've done something that really is not a good idea, would someone please tell me before I goof something up really bad??!!

Thanks bunches!

Now - on to figuring out how to change the add to cart image to a regular submit button......

~Allison

2 Apr 2008, 12:09 AM
#12
madamsplash avatar

madamsplash

New Zenner

Join Date:
Apr 2007
Location:
Cairns
Posts:
10
Plugin Contributions:
0

Post #12 by madamsplash

Looks like it's in includes/modules/product_listing.php
But I removed the <br /> from this line:

        
case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  $lc_price;
```As well as this one:
```php
        $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link)
```and replaced the second <br /> with a heap of spaces ( ). 

This worked for what I was trying to achieve but may be different to what you're looking for.
10 Sep 2009, 9:01 PM
#13
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

Post #13 by redcinamn

any luck with anyone changing this on 1.3.8?
Red

Red

11 Sep 2009, 2:31 PM
#15
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

Post #15 by redcinamn

madamsplash:

Looks like it's in includes/modules/product_listing.php
But I removed the <br /> from this line:

case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;

> ```php
        $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link)
```and replaced the second <br /> with a heap of spaces ( ). 
> 
> This worked for what I was trying to achieve but may be different to what you're looking for.

Really??
I tried the exact above and no luck
Red

Red

11 Sep 2009, 2:41 PM
#16
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Post #16 by three_sisters

Redcinamn:

Really??
I tried the exact above and no luck
Red

Well - I'm not sure that's what I did. You'll notice a post above that I said I altered a different file. This person seemed to find a different way to accomplish it. I am NOT a PHP expert - not even remotely close - so I can't remember what it was that I changed exactly. Give me a little time and I'll look around to see exactly what I did. Did you look at my site? Is this what you're looking for? Link to my procucts.

11 Sep 2009, 4:00 PM
#18
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #18 by gjh42

That one is really simple, though as you are on the product info page instead of the product listing page, the above files are irrelevant.

You want to edit /includes/templates/your_template/templates/tpl_product_info_display.php and remove <br /> tags from the add to cart section. There are several lines that have them, so look carefully.

11 Sep 2009, 4:07 PM
#19
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Post #19 by three_sisters

I just read more carefully... madamsplash and I are altering the same file.

Honestly, I really don't know what I'm doing. I just play around until it looks right - and sometimes that takes me a very long time. :)

Page 1 of the post shows you exactly what I did. But, on looking at your source code, it looks like all you need to do is get rid of that <br> and add a couple of   (spaces) so the add to cart button doesn't sit right next to the quantity box.

I'm sorry I can't help more. Maybe someone with more knowledge than me will jump in.

As to the "border" - Do you mean the fly out side bar menu? That was just an add-on (or do they call it a mod?) by Dr. Byte, I think. It's really easy to add and use - I love it.

Hope it goes well for you!