Jump to content

[SOLVED] Disable products page


gr4devel

Recommended Posts

Hi community :).

One simple question.

Is it possible to completely disable the products page without touching the code?

I mean the page related to each different product?

The reason why I'm asking this is that I need to create some shops in which the products have not specific description and particularities.

 

Thanks in advance :).

Edited by gr4devel (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Oh man I'm so sorry for my lateness!!! :(

 

Please forgive me! :(

 

However the only solution is to remove from the template product-list.tpl of your theme all the links (i.e. html anchors) that refers to the products detail pages.

 

If you want to integrate the product's attributes and prices in the product list you have to create a module that hooks right after the CategoryController processing so that you can retrieve what you want (i.e. the attributes and prices).

 

Hope this can help :).

 

P.S: sorry again for my lateness :(

Link to comment
Share on other sites

  • 2 months later...

thanks vekia,

 

here is the condition i have wrote in order to disable product view for a specific category (of course the other links in product list tpl should be removed too), for a specific product replace first line with {if $product.id_product == 14}

 

{if $category->id != 14}
                <a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>
{/if}

 

Maybe it is helpful for someone too.

Edited by sooroos (see edit history)
  • Like 1
Link to comment
Share on other sites

it works perfectly and i have wrote such a "big" condition because i need many different names for the link, and for some categories completely disabled

 

the shop is almost finished :) but it is still in maintenance because the owner cannot take orders for the moment. one more week.

i will definitely present it here. It is an online pizza shop and i needed to change and improve a lot of things and still two more to resolve before it is available:

 

1. carriers need to be displayed as drop-down list: posted here

2. i need a button in the cart for deleting all the products at once (German rules): here

 

Link to comment
Share on other sites

  • 1 month later...

in shopping cart (order process) page:

open shopping-cart-product-line.tpl file located in your theme directory

remove this code form all href="" codes:

{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'htmlall':'UTF-8'}

and form block cart:

/modules/blockcart/blockcart.tpl

 

remove this:

{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|escape:'html'}

the same as before - from all href="" that you;'ve got there

  • Like 1
Link to comment
Share on other sites

okay thank you, so in this case you have to change also one thing:

 

open blockcart-json.tpl and just remove: "{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|addslashes|replace:'\\\'':'\''}"

 

from: "link":  "here"

{assign var='productAttributeId' value=$product.id_product_attribute}
	{ldelim}
		"id":            {$product.id_product},
		"link":          "",
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...