PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

remove the add to cart button on list pages!!!

10 replies to this topic
#1
fitgura

    PrestaShop Apprentice

  • Members
  • PipPip
  • 203 posts
I have an error message when try to put a product into the cart on a product short descriptioned list page.... doesn't matter even is a first or second ... product in the list the customers only can put the desired product when they see it on a full detailed page.....

I searched the forum :

http://www.prestashop.com/forums/viewthread/12617/


but this cannot give me a solution , so I decided ask you how to remove the order buttons from the listed products!!!

Somebody could help me please!!???

I use ps 1.1.0.5

thank you
The road to success always Under Construction!

#2
Divine

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2800 posts
Hi,

you can remove it in the folder product-list.tpl
Image IPB
Webdesign et développement pour Prestashop
Templates Prestashop - Modules Prestashop
.

#3
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5753 posts
The file /themes/prestashop/product-list.tpl

Look for the text "Add to cart" and remove the entire botton code.
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#4
fitgura

    PrestaShop Apprentice

  • Members
  • PipPip
  • 203 posts
Thanks for advise both of you!! :)

But I have an Idea!!!!!

does anybody know , in the mysql database which table contains the uploaded products quantity???????????????

Because all of this problem came from the products quantity set to 0, and I could set them up to 999 or something big, and it couldsolve the problem without remove the button!!!!

please tell me if you know!!

thanks!
The road to success always Under Construction!

#5
Divine

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2800 posts
why don't you set the quantities directly in your product settings ?
Image IPB
Webdesign et développement pour Prestashop
Templates Prestashop - Modules Prestashop
.

#6
fitgura

    PrestaShop Apprentice

  • Members
  • PipPip
  • 203 posts
Please somebody tell me how to modify the products quantity in the mysql daabase!!!!!!!!!!!!!

Divine: I have approx 800 products in the shop and I don't want to open evry products page sep by step... that is why I wanna modify all the 0 qt. products to 999!!!

Please advise me!!!!
The road to success always Under Construction!

#7
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
It is the `quantity` field in the `ps_product` table that you are looking for. You could write an SQL query like the following to change all products with quantity 0 to quantity 999:


UPDATE `ps_product` SET `quantity` = 999 WHERE `quantity` = 0

Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#8
fitgura

    PrestaShop Apprentice

  • Members
  • PipPip
  • 203 posts
Rocky!!!

you are a genuine hero :)

thanks for advise I could try it now!!!
The road to success always Under Construction!

#9
htech

    PrestaShop Apprentice

  • Members
  • PipPip
  • 139 posts
Hey guys,

im also looking to remove the ADD to cart button on the product-list.tpl page but when i remove the code it still stays there?


{/if}
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
{if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2}
getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}
{else}
{l s='Add to cart'}
{/if}
{/if}
{l s='View'}
{if isset($comparator_max_item) && $comparator_max_item}

<input type="checkbox">


{/if}


so i remove the following ...


getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}
{else}
{l s='Add to cart'}
{/if}


but that doesnt seem to work coz the button still appears there?
any suggestions?

#10
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
You probably have "Force compile" disabled. Go to the Preferences > Performance tab and make sure that "Force compile" is enabled while you are making changes to TPL files. Disable it again when you're done to speed up your website again.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#11
htech

    PrestaShop Apprentice

  • Members
  • PipPip
  • 139 posts
thanks man! worked like a charm!