jthornton Posted February 4, 2018 Share Posted February 4, 2018 I've figured out how to remove all the other things from the main page except the best sellers and mailing list. How do I remove them? JT Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 4, 2018 Share Posted February 4, 2018 Look in main.php for {include file='templates/box.newsletter.php'} and {include file='templates/box.popular.php'} Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 4, 2018 Author Share Posted February 4, 2018 Thanks JT Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 5, 2018 Author Share Posted February 5, 2018 And for anyone that reads this you need to use html comment marker if you just comment out the line, php comment markers don't work in html. JT Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 5, 2018 Share Posted February 5, 2018 (edited) Please note that the template rendering engine (Smarty) builds the page before the web browser gets it. Putting HTML comment tags around the Smarty commands does not stop Smarty from replacing those {commands-in-braces} with the intended content. That intended content could also have HTML comment tags. That results in nested comment tags. Look for those statements in the template as mentioned earlier, but change them to look like this: {* include file='templates/box.newsletter.php' *} and {* include file='templates/box.popular.php' *} The brace-asterisk-space sequence is Smarty's comment tag. Thus, the content will not appear in the rendered page sent out to the browser. Edited February 5, 2018 by bsmither 1 Quote Link to comment Share on other sites More sharing options...
jthornton Posted February 5, 2018 Author Share Posted February 5, 2018 (edited) And thanks again, I looked at the source for the page and sure enough there was the tag. <!-- <div class="panel" id="box-popular"> <h3>Best Sellers</h3> <ol> <li><a href="http://localhost/cubecart/test-category/test-product.html" title="Test Product">Test Product</a><br> $10.00 </li> <li><a href="http://localhost/cubecart/test-category/5i25.html" title="5i25">5i25</a><br> $99.00 </li> </ol> </div> --> Changed to the smarty comment tag and sure enough they are not generated. Of course the reason I didn't delete the tag is I might change my mind. Thanks again for the help. JT Edited February 5, 2018 by jthornton add more info Quote Link to comment Share on other sites More sharing options...
LKW Posted February 20, 2018 Share Posted February 20, 2018 Having a problem locating the main.php file. Any pointers on location? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 20, 2018 Share Posted February 20, 2018 Starting at Cubecart's main folder, look in the /skins/ folder. This folder has a collection of folders named for the available skins that CubeCart can use. Determine the name of the skin your store is currently using. Look in that folder to find the /templates/ folder. The template main.php will be in there. Quote Link to comment Share on other sites More sharing options...
LKW Posted February 20, 2018 Share Posted February 20, 2018 I'm using the Mican skin, after locating the mican/templates/main.php file the only codes there are: {include file='templates/box.errors.php'} and {include file='templates/ccpower.php'} Are the commands located somewhere else? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 20, 2018 Share Posted February 20, 2018 (edited) In the Mican skin, you will want to make these changes: In main.php, near line 69, find: {$MAIL_LIST} Change to: {* $MAIL_LIST *} Near line 72, find: {if isset($POPULAR_PRODUCTS)}{$POPULAR_PRODUCTS}{/if} Change to: {if isset($POPULAR_PRODUCTS)}{* $POPULAR_PRODUCTS *}{/if} After making changes to a skin template, you should clear the cache (admin, Maintenance, Rebuild tab, check Clear Cache). Edited February 20, 2018 by bsmither Quote Link to comment Share on other sites More sharing options...
LKW Posted February 20, 2018 Share Posted February 20, 2018 Got it, thanks. 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.