Matthew66 Posted April 29, 2022 Share Posted April 29, 2022 (edited) Hi, Does anyone have a code fix to change the ADD TO BASKET on the main page and Category page sections of CC 6.4.5 to NOT add a product to the basket, but with a MORE INFO or INFO button that will direct the customer to the product page? Thanks Edited April 29, 2022 by Matthew66 Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 29, 2022 Share Posted April 29, 2022 In the Foundation skin template 'content.homepage.php', near lines 43-45, find: Find: {* Remove comment if you want info button <a href="{$product.url}" title="{$product.name}" class="button tiny secondary left">{$LANG.common.info}</a> *} Change to: {* Showing info button *} <a href="{$product.url}" title="{$product.name}" class="button tiny secondary left">{$LANG.common.info}</a> {* *} But now the whole "Add to basket" needs to be suppressed. Line 46: {if $CTRL_HIDE_PRICES} Change to: {* {if $CTRL_HIDE_PRICES} Lines 75-76, from: <input type="hidden" name="add" value="{$product.product_id}"> </form> Change to: <input type="hidden" name="add" value="{$product.product_id}"> *} </form> Another necessary change, line 58, from: {* ctrl_stock True when a product is considered 'in stock' for purposes of allowing a purchase, either by actually being in stock or via certain settings *} Change to: <!-- ctrl_stock True when a product is considered 'in stock' for purposes of allowing a purchase, either by actually being in stock or via certain settings --> The Foundation skin template 'content.category.php' has two sections (list and grid views), and the grid view is similar to the Homepage layout. So, for the grid view, make the same edits at lines 163-165: From: {* Uncomment this if you want to show a more info link <a href="{$product.url}" title="{$product.name}" class="button tiny secondary left">{$LANG.common.info}</a> *} Change to: {* Showing a more info link *} <a href="{$product.url}" title="{$product.name}" class="button tiny secondary left">{$LANG.common.info}</a> {* *} Line 166, from: {if $product.available <= 0} Change to: {* {if $product.available <= 0} Lines 189-191, from: {/if} </div> </form> To: {/if} *} </div> </form> Another necessary change, line 172, from: {* ctrl_stock True when a product is considered 'in stock' for purposes of allowing a purchase, either by actually being in stock or via certain settings *} Change to: <!-- ctrl_stock True when a product is considered 'in stock' for purposes of allowing a purchase, either by actually being in stock or via certain settings --> For the Category's list view, there is no code provided for an Info button (but code can be added). This will just suppress the "Add to Basket" button. The image and product name serves as links to the product's Details page. Line 106, from: {if $product.available <= 0} Change to: {* {if $product.available <= 0} Lines 129-132, from: {/if} </div> </div> <div class="product_grid_view hide"> Change to: {/if} *} </div> </div> <div class="product_grid_view hide"> Additional tweaks may be necessary. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.