Jump to content

Using Buy now Button instead of More Info..


Guest

Recommended Posts

Hi All,

If you want to use some buy now buttons for your product listings instead of the more info button, you can do this by changing the link to,

view_cart.php?add=$product&quan=1

I've also done somthing simular that included both a quantity box and buy now button on the product listings page. I can post that too if anyone wants.

Just an idea,

Chris

Link to comment
Share on other sites

Hello,

You would need to change the code in either the index.php or in the view_product.php pages.. Just replace the add to cart link with the one above. You'll also need to change the add to cart or more into button to buy now as well.

Chris

Link to comment
Share on other sites

Guest stijnj

this is a good but cernainly not the best solution for a fast-shopper

when you would use this with a product that has product options, the product will be added to the cart without any option.Result is that you would either loose sales or end up comunicating with the customer and ask him what product option he would need

example

product : t shirt

product options : small,medium, large and xlarge

button add to cart result : 1 t-shirt and no product options available in the cart

gets even worse with fixed option prizes

product : painting

product options :

8x8 = $50

10x10 = $100

12x12 = $150

button add to cart result : 1 painting and no product options available in the cart

in another topic i have mentioned this before, it only works correct in a store full of products without 1 single product option.

Stijn

Link to comment
Share on other sites

Hello,

Very true.. However, all products should have a default option, not a "Select One" option..

If you wanted to do it the right way, you'd just use an if check to see if the product has any options, if true, show the add to cart button, if false, just display the buy now button..

Fairly simple to do I think.. Just have to get a bit creative with your thinking or the logic.

Chris

Link to comment
Share on other sites

Just a side note... This is moreless the same feature used with the instock mod.. If the product s not in stock, the add to cart button is hidden or unlinked..

You can use this method everywhere for just about anything..

Regards,

Chris

Link to comment
Share on other sites

  • 2 months later...
Guest kencash

Hi,

Instead of changing the more info button to buy now button, anyone knows how do i add the "buy now" button on top with a text link "more info" below it?

Thanks

Ken

Link to comment
Share on other sites

I've also done somthing simular that included both a quantity box and buy now button on the product listings page. I can post that too if anyone wants.

Just an idea,

Chris

That would be very helpful

thanks.

Link to comment
Share on other sites

I add a buy now botten under the more info button like this

<tr>

<td height=\"24\" width=\"94\" background=\"images/white_button.gif\" align=\"center\" valign=\"middle\" style=\"cursor: hand;\" onClick=\"view_cart.php?add=$product&quan=1=$product'\"><a href=\"view_cart.php?add=$product&quan=1=$product\"><font class=\"wht_btn\">buy now</font></a></td>

Right under

About line 415

In the INDEX.PHP

<td height=\"24\" width=\"94\" background=\"images/white_button.gif\" align=\"center\" valign=\"middle\" style=\"cursor: hand;\" onClick=\"location.href='view_product.php?product=$product'\"><a href=\"view_product.php?product=$product\"><font class=\"wht_btn\">$la_more_info</font></a></td>

Hope this help someone its my frist MOD I have made for cubecart :)

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

here is it IF you wish to use buy now botton with the instock mod..

look for line about 360

$bgcolour=$colour_4;

while($row = mysql_fetch_array($result))

{

$product=$row["product"];

$description= $row["description"];

$price=$row["price"];

$sale_price=$row["sale_price"];

$image=$row["image"];

$comcount=$row["comcount"];

$title=$row["title"];

$title=stripslashes($title);

$description=stripslashes($description);

$description=substr($description,0,100);

add this at bottom

$instock = $row["instock"];

Now for the kicker

find about line 420

{

echo"$currency$price";

}

echo"</td>

<td align=\"center\" valign=\"middle\" height=\"48\" width=\"94\">

<table width=\"94\" height=\"24\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">

<table width=\"94\" height=\"24\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">

add this below

<tr valign=\"middle\">

";

if($instock=="0"){

echo("<td height=\"24\" width=\"94\" align=\"center\" background=\"images/white_button.gif\"><font color=red><b>$la_sold_out</b></font>");

}

else

{

echo("<td height=\"24\" width=\"94\" background=\"images/white_button.gif\" align=\"center\" style='cursor:hand;' onClick='add_product.submit();'><font class=\"wht_btn\">Buy Now</font>");

}

echo"</td></tr>

****

done

****

:)

this was tested on the new instock mod!!!

Link to comment
Share on other sites

Guest twisted

use an if statement simple php

I've seen you say that, or somehting similar, many times.

Instead of something so unhelpful (and it is to someone to whom even simple php is double-dutch), try posting some helpful code that the OP can actually use!

Link to comment
Share on other sites

  • 7 months later...

... :D

.. hey.. could someone help me out with this one..??

i'm about to add this 'sold out/buy now' button but..

i want the sold out/buy button located in the same column and right under the price tag..

... any one..?? :innocent:

thx..

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...