Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy Now


Guest

Recommended Posts

Hi guys,

 

I have got a quick question to ask you. I would like to know whether it is possible to remove the "Buy Now" buttons for one manufacturer. For example, you click on Ping and you just see the products and you can click on the products but you cannot see the Buy Now button. Basically, I presume that you'd need an IF statement saying "If manufacturer's name = Ping, disable Buy Now". How you'd do this and where you'd put it is beyond me. Any ideas?

 

Many thanks

Link to comment
Share on other sites

Seems like this topic has got lost amongst the many other topics. I really would appreciate your help on this issue. Many thanks

 

Rob

Link to comment
Share on other sites

I'm not quite sure if this will do the trick for you, but there was a contrib just put up that allows customers to view items that are out of stock. I haven't taken a close look yet, but it might be along the lines you are talking about. Search the contribs for soldout (1 word).

 

Jeremy

Link to comment
Share on other sites

Thanks for telling me about that but it didn't help.

 

I've been playing around with some code, and so far I've come up with something incredibly simple. Now it's the hard part! How would you tell osC not to display the Buy Now button?

 

What I've currently got is:

 

	if ('manufacturers_id'== 10)

 

So as you can see, not much! I've thinking of placing the code in index.php on, or around lines 136 where it mentions the following:

 

// create column list
   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                        'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

Any ideas so you guys can help out?

Link to comment
Share on other sites

Right...well after giving it some thought and speaking to some experienced PHPers...I've been told that it's not possible to do what I want with the current setup. Is this correct, or is it because they do not understand osC? Basically, I do need something like this to be in place because I have products that I have a price of ?0.00 for and i don't want them trying to get it for free! How about removing the actual price on the Product Description, and list screen for certain manufacturers? Is that possible?

Link to comment
Share on other sites

Right...well after giving it some thought and speaking to some experienced PHPers...I've been told that it's not possible to do what I want with the current setup.  Is this correct, or is it because they do not understand osC?  Basically, I do need something like this to be in place because I have products that I have a price of ?0.00 for and i don't want them trying to get it for free!  How about removing the actual price on the Product Description, and list screen for certain manufacturers?  Is that possible?

 

Actualy, you can. I modified the buy now buttons for new expected and seasonal items. The key is in catalogs/includes/product_listing.php.

 

You have to write a db query calling the manufacturer's id, then modify the code begining about line 131 with an 'if' statement.

 

hth

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Actualy, you can. I modified the buy now buttons for new expected and seasonal items. The key is in catalogs/includes/product_listing.php.

 

You have to write a db query calling the manufacturer's id, then modify the code begining about line 131 with an 'if' statement.

 

hth

 

Ah ok. My knowledge of PHP is very limited, if non-existent so would something like this suffice?

 

On line 26 (line 23, 24, 25 and 27 are also displayed)

 

<?php
 }

 $HTTP_GET_VARS['manufacturers_id'];

 $list_box_contents = array();

 

On line 134 (line 133 is also displayed)

 

          case 'PRODUCT_LIST_BUY_NOW':
    if ('manufacturers_id' = 10) {'PRODUCT_LIST_BUY_NOW' = FALSE};

 

I mean I'm guessing that won't work but if you could point me in the right direction, I'd be most grateful.

Link to comment
Share on other sites

I might be wrong here but wouldn't this contribution work?

 

(Hide price if ?0.00)

 

http://www.oscommerce.com/community/contributions,1826

 

 

We use it here The Lingerie Store to show a product that you can order but you can't

attempt to buy it. Click one of these products and you will see there is no

Buy Now button.

 

Hope this helps

 

Derek

Link to comment
Share on other sites

I might be wrong here but wouldn't this contribution work?

 

(Hide price if ?0.00)

 

http://www.oscommerce.com/community/contributions,1826

We use it here The Lingerie Store to show a product that you can order but you can't

attempt to buy it. Click one of these products and you will see there is no

Buy Now button.

 

Hope this helps

 

Derek

 

He wants to hide the buy now buttons for certain manufacturers. I'll try to post the code here later today. Need to do some debugging on it, since I don't use a manufacturer filter on any of my sites.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

He wants to hide the buy now buttons for certain manufacturers. I'll try to post the code here later today. Need to do some debugging on it, since I don't use a manufacturer filter on any of my sites.

 

But surely if all the prices for this manufacturer were set to zero this contribution would work.

 

Derek

Link to comment
Share on other sites

Derek - many thanks for pointing out that contribution. Yes that is exactly what I was looking for...I thank you.

 

George - I would also like to thank you for your help. You've got me understanding a small segment of PHP code now! Every little helps...

 

So once again, thank you both for your help. It is much appreciated. :thumbsup: :thumbsup:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...