BWG Posted August 9, 2016 Share Posted August 9, 2016 Is there any way to get CubeCart to select just one specific product and only that one product over and over? Quote Link to comment Share on other sites More sharing options...
bsandall Posted August 9, 2016 Share Posted August 9, 2016 See this Pull Request. If you're handy with Git, you can pull it into your own repo and be done; otherwise, click on the 'Files Changed' tab to see which edits you need to make. Note that these edits allow you to have any number of specifically featured products. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 9, 2016 Share Posted August 9, 2016 In stock code, no. One would need to make an edit to the database query that selects a Featured Product (actually, 'Random'), or implement a plugin. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted August 9, 2016 Share Posted August 9, 2016 You can hard code it in rather than have it auto generated. If you view source code you will see the html for the featured product between these opening and closing div tags. <div class="panel" id="box-featured"> <h3>Featured Product</h3> product code in here </div> Copy the code into the templates/box.featured.php file and change the code to the product you wish to feature replacing everything below the *} Quote Link to comment Share on other sites More sharing options...
BWG Posted August 9, 2016 Author Share Posted August 9, 2016 Here is the code from templates/featured.php, not sure where to put your code.... <div id="featured_product"> <form action="{$VAL_SELF}" method="post" class="top addForm" enctype="application/x-www-form-urlencoded"> <h3>{$LANG.catalogue.title_feature}</h3> <p class="image"> <a href="{$featured.url}" title="{$featured.name}"> <img src="{$featured.image}" alt="{$featured.name}" /> </a> </p> <p class="title"><a href="{$featured.url}" title="{$featured.name}">{$featured.name}</a></p> {if $featured.ctrl_sale} <p class="price"><span class="price_previous">{$featured.price}</span> <span class="price_sale">{$featured.sale_price}</span></p> {else} <p class="price">{$featured.price}</p> {/if} {if $featured.ctrl_purchase && !$CATALOGUE_MODE} <div class="button"> <input type="hidden" name="add[{$featured.product_id}][quantity]" value="1" /> <input type="submit" class="button_add_basket" value="{$LANG.catalogue.buy_now}" /> </div> {/if} </form> </div> Quote Link to comment Share on other sites More sharing options...
ayz1 Posted August 9, 2016 Share Posted August 9, 2016 Replace all of that. Depending on how many products you have if you reload your page you may see the product you want as a featured product. View source then copy the code for your product. If you have a lot of products then amend the product code to the one you want. Your code may be slightly different depending on what skin you are using but the principle is the same. Quote Link to comment Share on other sites More sharing options...
BWG Posted August 9, 2016 Author Share Posted August 9, 2016 Thanks ayz1.... Did the trick... Once again, always great help in the forums... Quote Link to comment Share on other sites More sharing options...
zombiesbyte Posted August 29, 2016 Share Posted August 29, 2016 made it all the way down before I realised this was solved. Mark as solved please 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.