bsmither Posted September 25, 2015 Share Posted September 25, 2015 In CC6, you no longer need to use {php} ... {/php}. You can use the real code delimiters <?php ... ?>.Also, the Foundation skin (introduced with CC6) uses a somewhat different approach as opposed to other CubeCart skins (such as Kurouto). So, in addition to the above statement, for CC6, you will also need this statement - which should affect all CubeCart skins:$GLOBALS['smarty']->clearAssign('featured'); Quote Link to comment Share on other sites More sharing options...
CoderJim Posted September 25, 2015 Share Posted September 25, 2015 In CC6, you no longer need to use {php} ... {/php}. You can use the real code delimiters <?php ... ?>.Also, the Foundation skin (introduced with CC6) uses a somewhat different approach as opposed to other CubeCart skins (such as Kurouto). So, in addition to the above statement, for CC6, you will also need this statement - which should affect all CubeCart skins:$GLOBALS['smarty']->clearAssign('featured');Thanks and just to be sure I understand, I could use this snippet for my skin (not foundation)? Could you also please tell me where it is that I put this snippet within the admin CP?{?php} $GLOBALS['smarty']->clearAssign('featured');{?} Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 25, 2015 Share Posted September 25, 2015 CC6 Admin, Manage Hooks, Code Snippets tab, Add Snippet.To cover all skins, assuming your skin uses standard CubeCart data names, the PHP Code block will look like:<?php $GLOBALS['smarty']->clearAssign('RANDOM_PROD'); $GLOBALS['smarty']->clearAssign('featured'); ?> Quote Link to comment Share on other sites More sharing options...
CoderJim Posted September 25, 2015 Share Posted September 25, 2015 CC6 Admin, Manage Hooks, Code Snippets tab, Add Snippet.To cover all skins, assuming your skin uses standard CubeCart data names, the PHP Code block will look like:<?php $GLOBALS['smarty']->clearAssign('RANDOM_PROD'); $GLOBALS['smarty']->clearAssign('featured'); ?> Just to be sure i do it right, could you please tell me what to write in the fields on the 'Add Snippet' page...I get that it needs to be named but what about these...?Ex. order:Description:Trigger: Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 25, 2015 Share Posted September 25, 2015 Enabled: OnUnique ID: [email protected] {<=32 characters max}Execution Order: 1Description: Unsets the data array and the template contents from Smarty for the Featured Product box.Trigger: class.gui.displayVersion: 1.0Author: forums.cubecart.com/topic/47380-remove-feature-product-replace-with-staticThere is another hook we can try if that one doesn't work. 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.