Missing something here...How can I get the buttons to sit next to each other?

I am using this grid layout because it shows the list price and discounted price. I want the buttons to sit next to each other but they have the same class and ID attached to both of them. Rather confused as to what I should do.


This is a problem with your templates, not with CS-Cart. Presumably you have a customised skin as the buttons in your attachment are not from the default install.

The ID should definitely be unique, something like “button_wishlist_prodID” and “button_cart_prodID” and the class for the buttons should also be unique, anything less is bad practise.

Nobody can advise how to achieve what you are trying to do without seeing your existing code and CSS.

The buttons are both in a div the div for both of them in button-container. The IDs are different with the productID on the end of it. How do I write CSS for this when each ID is different? I figured out what I was doing wrong with the CSS but now I dont know how to implement this into the style sheet to align each button correctly.

The ID isn't important for this, I was only clarifying that the ID's should be different.

You need seperate classes for the buttons. Or you can use some dirty CSS trickery. Using seperate classes is better for semantic purposes.

Alright. Thank you. Any idea which .tpl thiis would be in? Still getting used to navigating around all these things.

Ah ha! Wishlist is an addon. Simple fix to get it lined up correctly. Just rename the button-container class.

exactly what file(s) do i need to look at in order to adjust the style in the Quick view popup for the “view details and add to cart” buttons wrapper…not sure why cs cart needed to and inline style here …the class and id use here is plentiful…lol maybe they thought ‘style’ would feel left out if they didnt use that too …just teasing guys…but for real I’d like to take the “style” and make a class for it so that it can be adjusted as needed…but where oh where is the file that contains this code ???

hopefully this is a simple question to answer for one of you sassy cs-cart gurus ;)


CS-Cart uses a lot of {if} statements to build class names and the like. Something like this:

The buttons for the quick view 'View Details' and 'Add to Cart' are in /skins/skin_name/customer/buttons/quick_view.tpl. Both use 'buttons/button.tpl'.

To style them, I would change the 'but_role' value (in either /skins/skin_name/customer/buttons/quick_view.tpl and /skins/skin_name/customer/views/products/quick_view.tpl) to 'customaddtocart' and then code the 'customaddtocart' with custom class in /skins/skin_name/customer/buttons/button.tpl.

Hope that ramble is of some use to you.

thank you thank you.

im getting kind of good at siphering ramblese. ;)

I’ve looked through the templates and i understand the process you suggest of creating a new/different container if thats what you were meaning…

but thata doesnt neccessarily fix the existing code that determines the width of the container in question.<–the goal

i really really am trying to keep this thing as easily upgradeable as possible.

So…the other part of the goal is to remove the inline style and use css with the existing id and class.

same ol cs cart desire huh. lol

thank you for your help Stellar


funny part is …all it boils down to is that i want to change the width of the quick view and want the view details and add to cart container to change too…thats all. seems like way too many $but's in that button.tpl! *grin


[quote name='BluBT' timestamp='1360629824' post='154953']

i really really am trying to keep this thing as easily upgradeable as possible.


You best be using 'hooks' then…

To change the Quick View dialog height/width, add height/width attributes to the CSS class:


Then remove the inline styles from the pop-up

. They are generated in /skins/skin_name/customer/common_templates/popupbox.tpl

aahhhh thats what i'm talking about …let me go “hook” that up!

Thank you Stellar…Cheers!


one more question … what determines the value of $but_css and where is that value stored?

HA just kidding thats just two more questions ;)


{if $but_css}style="{$but_css}"{/if}

I would have therefore thought you would get something like this or similar in at least one of the templates:

{include file="buttons/button.tpl" but_id=$but_id but_text=$lang.sign_in_to_buy but_href=$login_url but_role=$but_role|default:"text" but_name="" but_css="some:inline, css:here;"}

But I cannot find any instances of “but_css” in any template files nor anywhere else in the cart files for that matter!

So far this is what i've found in skins/yourskin/customer/buttons/button.tpl for me its line 22. so …sactly where does the value for $but_css come from ? i'd like to strip that but so far only for one instance and i have a feeling that this code my affect many other areas.

p.s. this is MVE 3.0.4

{if $but_name && $but_role != “text” && $but_role != “act” && $but_role != “delete”} {* SUBMIT BUTTON *}

i “think” this code is what produces the following.


Nope, I don't think the code you posted is generating that HTML. Can't help you with but_css, it is something I would like to know too but I can't find any other instance of but_css and there are far too many instances of 'css' throughout the cart files to check out every one to find the culprit.

drat …

yeah the width, top, left are being generated somewhere …where o where …maybe somewhere over the skittles rainbow…lololol


No idea, even when I do a content search of all php and tpl files used in the cart, I still can't find but_css or anything related except from in the button template files. I can find the controllers for but_role, but_id, but_name, etc, but not but_css.

thats what im saying …bizzare huh.