Add to cart text instead of button

General ShopSite user discussion

Add to cart text instead of button

Postby jackie » Thu Oct 11, 2007 10:49 am

Hi,

Does anyone know how to make the "add to cart" button show up as a text link instead of a button without changing the main setting for this in the Shopsite back office? I have other "add to cart" buttons in the site that I want to stay as buttons, I only want to make it text on a few.

Here is the line of code in my custom template that I want to change to text, currently this makes a button:

<input class="add" type=submit value="Add to Cart">


Here it is again inside the if statement.:

[-- IF PRODUCT.QuantityPricing --]

<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
<input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty" value="1" >
<input type=hidden name=storeid value=[-- STORE_ID --]>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]>

<input class="add" type=submit value="Add to Cart">

</form>

[-- END_IF --]
jb
jackie
 
Posts: 31
Joined: Mon Mar 12, 2007 12:41 pm

Postby loren_d_c » Thu Oct 11, 2007 12:43 pm

In order to have the Quantity input box as part of your order button then it must be a form. In order for the order button to submit the form, it must be a form submit like is it now:

Code: Select all
<input class="add" type=submit value="Add to Cart">


Unfortunately, the browser's default rendering of a 'text' form submit (i.e. it's not an actual graphic image) is to make a little grey or brown button-looking thing around it. To make it display as a regular text link you could remove the Quantity input box (uncheck the Display Order Quantity checkbox in the product's Edit Product Layout menu), or you can figure out what the CSS would be to define how an text input button looks to make it look like a regular text link. I've seen it done before (I've also seen the default browser-created button resized, recolored, and restyled by CSS), but I have no idea off the top of my head how to do it.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Postby jackie » Thu Oct 11, 2007 12:48 pm

Thanks loren_d_c,

I didn't realize the button was CSS, problem solved.
jb
jackie
 
Posts: 31
Joined: Mon Mar 12, 2007 12:41 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 94 guests

cron