gr4devel Posted June 2, 2013 Share Posted June 2, 2013 (edited) 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 June 2, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 2, 2013 Share Posted June 2, 2013 No, it isn't possible. You can achieve this only by editing classes (and theme files) of your store. Link to comment Share on other sites More sharing options...
gr4devel Posted June 2, 2013 Author Share Posted June 2, 2013 Ok thank you very much vekia. I've already identified the themes files that I've to modify to achieve my goal . Thanks again . Link to comment Share on other sites More sharing options...
sooroos Posted June 15, 2013 Share Posted June 15, 2013 hi gr4devel i am interested in that too, can you please post your solution here? thx Link to comment Share on other sites More sharing options...
vekia Posted June 15, 2013 Share Posted June 15, 2013 i think that he removed all links to the product pages, defined for example in the template files like: product-list.tpl or for example in the modules like homefeatured (homefeatured.tpl) etc. Link to comment Share on other sites More sharing options...
sooroos Posted June 15, 2013 Share Posted June 15, 2013 as a matter of fact i would like to integrate the product's attributes and prices in product list and disable product details, if that' s possible Link to comment Share on other sites More sharing options...
gr4devel Posted June 18, 2013 Author Share Posted June 18, 2013 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 More sharing options...
sooroos Posted September 3, 2013 Share Posted September 3, 2013 No, it isn't possible. You can achieve this only by editing classes (and theme files) of your store. hi, Is it possible to hide the link for product detailed page only for specific products? Link to comment Share on other sites More sharing options...
vekia Posted September 3, 2013 Share Posted September 3, 2013 you can do it in product-list.tpl file but you will have to define there {if} condition which will check the id of product. If id of product == id of product you don't want to link - then just disable the anhors. Link to comment Share on other sites More sharing options...
sooroos Posted September 3, 2013 Share Posted September 3, 2013 (edited) 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 September 3, 2013 by sooroos (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted September 4, 2013 Share Posted September 4, 2013 sooroos it will be helpful definitely is there any chance to check how it works in "LIVE" shop ? Link to comment Share on other sites More sharing options...
sooroos Posted September 4, 2013 Share Posted September 4, 2013 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 More sharing options...
D-bird Posted October 21, 2013 Share Posted October 21, 2013 Is there a way to remove also the links to product detail page from shopping cart? There's one link in the product picture and one in the product name. I tried to search from shopping-cart.tpl but couldn't find them. Link to comment Share on other sites More sharing options...
vekia Posted October 21, 2013 Share Posted October 21, 2013 by shopping cart you mean shopping cart page or shopping cart block ? Link to comment Share on other sites More sharing options...
D-bird Posted October 21, 2013 Share Posted October 21, 2013 Actually both of them. I didn't even notice there is one in the block. So thank you for that! Link to comment Share on other sites More sharing options...
vekia Posted October 21, 2013 Share Posted October 21, 2013 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 1 Link to comment Share on other sites More sharing options...
D-bird Posted October 21, 2013 Share Posted October 21, 2013 Thank you vekia! Once again you saved the day Link to comment Share on other sites More sharing options...
vekia Posted October 21, 2013 Share Posted October 21, 2013 you're welcome can you check something in addition when you add something to cart, right after "animation", does the link appear in block cart ? Link to comment Share on other sites More sharing options...
D-bird Posted October 22, 2013 Share Posted October 22, 2013 Yes it does. The product I had there already doesn't have a link on it but when I add something it appears with as a link. Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 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": "", 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now