Dirty Butter Posted March 3, 2015 Share Posted March 3, 2015 My intent is to get the right column on the left side. Eventually I expect to replace the Featured Product with other boxes of my own creation. But I've noticed as I clicked around various Categories, Product Listings, and clicking repeatedly on Featured Products, that MY left hand Featured Products doesn't always show up. Here's what I did to main.php in my attempt to reverse the columns: <div class="row {$SECTION_NAME}_wrapper"> <div class="large-3 columns show-for-large-up"> {include file='templates/box.featured.php'} {* {include file='templates/box.popular.php'} *} {include file='templates/box.sale_items.php'} </div> <div class="small-12 large-9 columns small-collapse"> {include file='templates/box.errors.php'} {include file='templates/box.progress.php'} {$PAGE_CONTENT} </div> Did I do it correctly, or is something here causing the intermittent disappearance of the left column? Or is there some other place I must make similar changes? IF my main.php change seems right, then the mistake must be in the Featured box : Bsmither had previously helped me keep the out of stock items from showing up in Featured Item. Perhaps the column disappears when it would have been an out of stock item??? Here's my code in box.featured.php: {if $featured} {if $featured.stock_level gt 0} <div> <div class="panel" id="box-featured"> <h2> {$LANG.catalogue.title_feature}</h2> <a class="th" href="{$featured.url}" title="{$featured.name}"> <img src="{$featured.image}" alt="{$featured.name}"> </a> <h3><a href="{$featured.url}" title="{$featured.name}">{$featured.name}…</a></h3> <br> <h3> {if $featured.ctrl_sale} <span class="old_price">{$featured.price}</span> <span class="sale_price">{$featured.sale_price}</span> {else} {$featured.price} {/if} </h3> </div> </div> {/if} {/if} Any help is very much appreciated! I ended up taking the code off that eliminates out of stock items in Featured until someone has time to help. Something about the out of stock fix is messing it up. I have code for "boxes" of Special Occasions items that were Widgets in the Blueprint skin. If I knew how to add a box to Foundation, I could stabilize the column with one of those boxes. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 4, 2015 Share Posted March 4, 2015 I would say the edit to main.php is the correct approach for Foundation. In box.featured.php, the template code:{if $featured} {if $featured.stock_level gt 0} ... {/if} {/if} will only show the box if the product selected to be shown has a stock level greater than zero. A better solution would be to have CubeCart query for another 'featured' item that has a stock level. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 4, 2015 Share Posted March 4, 2015 I worked out the procedure to have the GUI class show only "Featured" items that are in stock. Two approaches: * a small code edit that will not survive an upgrade * a hook that requires a different small edit that hopefully will be implemented in the next release. Interested? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 4, 2015 Author Share Posted March 4, 2015 Definitely interested in the hook. I would think this would help many people! Won't be online for long this morning, but will check back sometime this afternoon. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 4, 2015 Author Share Posted March 4, 2015 Working now to upgrade to 6.0.b07. Will let you know when I'm ready to experiment. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 5, 2015 Share Posted March 5, 2015 Whenever you're ready. In /classes/gui.class.php (beta 7), at the end of: private function _displayRandomProduct($p=0), find: Was: if($random_product) return $product; Now: if(true || $random_product) return $product; // Tests suggest that just returning $product is sufficient. Immediately above that, find: } elseif ($p<20) { // Math to generate random product might give a product_id that doesn't exist or doen't meet WHERE criteria $p++; $this->_displayRandomProduct($p); } Was: $this->_displayRandomProduct($p); Now: $product = $this->_displayRandomProduct($p); (I will petition to get this additional edit in the next release.) Create a Code Snippet: Enabled: Check Unique ID: rpis@cubecart600+ <<= 32 chars max, rpis: random_product_in_stock Execution Order: 1 Description: Makes sure random (featured) product to be shown is in stock. Trigger: class.gui.display_random_product Version: 1.0 Author: http://forums.cubecart.com/topic/49346-changing-foundation-layout-need-help/#entry206383 PHP Code: <?php if ((int)$stock_level <= 0) { $p++; $product = $this->_displayRandomProduct($p); } return $product; (Note: CC6 POSTs the PHP Code in such a way so as to not trigger server security, nor CubeCart's own internal sanitizer. So, in CC5 where one needs to use {php}, in CC6 one can use <?php.) Quote Link to comment Share on other sites More sharing options...
kalyncomputers Posted March 6, 2015 Share Posted March 6, 2015 Hi Have to admit that when I first saw Foundation, I thought, 'why is the column on the right'. However, Having populated a test site with 1150 products and looked at them, I have to say that I think having the column on the right is much better. It keeps the focus on the product being viewed. Just a personal view but a couple of people who have seen the test site agree. What would be really nice is if the menu bar could be left floating when product details are scolled down. However I know that this is not a simple job! Speaking of why I took this life up and changing for something else, how about a becoming a dustbin man? I used to know one who made a fortune picking scrap out of the bins he emptied. Probably not the same now that we have wheely bins. Tim Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 7, 2015 Author Share Posted March 7, 2015 I haven't forgotten this, Bsmither. Having problems getting some of the more complicated v5 edits to play nice with v6. Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted March 13, 2015 Share Posted March 13, 2015 This foundation one single template is going to cause CC owners away, because this template does not workout for everyone and no one seems to have any interest in making some different skins for different store's approach. Example, my store has over 20 category's on the left panel. Where will I even begin to try and add them when my Vector skin dies on April lol. I'm currently using the Vector which I have working just fine, but shopdev is dead on support, so one can only imagine that it will soon drop off the face of the world once the domain goes down on April. When that happens, I can no longer use CC because the foundation skin won't work for someone like me that has over 20 separated category's on Vector side bar. Just my personal opinion, maybe someone will read this and make some skins that will help stores like mine keep the tradition going. With respect, Eddie Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 13, 2015 Author Share Posted March 13, 2015 I have 10 categories and was using Blueprint. But I'm determined to get Foundation to work for me. I just redid my Animals category, which had the most subcategories, to hopefully work better with the top bar. https://dirtybutter.com/plushcatalog What's your url? Maybe fresh eyes will see a way to make yours work, too. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 13, 2015 Share Posted March 13, 2015 This foundation one single template is going to cause CC owners away, because this template does not workout for everyone and no one seems to have any interest in making some different skins for different store's approach. Agreed and there is some effort going into developing skins BUT it is a big investment to develop any sort of skin let alone anything good and to get to the functionality of Vector for example is a HUGE investment. Example, my store has over 20 category's on the left panel. Where will I even begin to try and add them when my Vector skin dies on April lol. I'm currently using the Vector which I have working just fine, but shopdev is dead on support, so one can only imagine that it will soon drop off the face of the world once the domain goes down on April. When that happens, I can no longer use CC because the foundation skin won't work for someone like me that has over 20 separated category's on Vector side bar. Your Vector skin wont suddenly stop working on April 1st if you download and update the new Fusion version that has removed the call home licencing check. Support has been non existent for 15 months and while Vector and Blueprint do still work pretty well and have very few bugs, there is no guarantee. Blueprint is responsive already but Vector isnt Ian Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted March 13, 2015 Share Posted March 13, 2015 Hello lan, and thank you very much for the response and advise. I wasn't even aware that the fusion update was available to remove call home. So the fusion update removes the call home, but if upgraded the Vector won't work? Is that what your trying to explain, because I currently have the Vector working fine for me for now, but of course with the old fusion that calls home. Just making sure I understood correctly... Thank you! Eddie Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 13, 2015 Author Share Posted March 13, 2015 As I understand it both skins will work until CC makes some future change that breaks them. But Vector is not responsive - that's important. Not sure how to designate a mobile skin with v6 using a v5 skin???? Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted March 13, 2015 Share Posted March 13, 2015 Hey Dirty Butter, Thanks for the reply. So I see, the'll work till future update. Yes I agree that it's good to know that the blueprint is already responsive. Hey I see that you manage to put some work in on the foundation huh. I have been using CC since day one for so many years now and love it, but I have to say. The only one thing that has kept cubecart from blowing most of these carts out of the market, has been the lack of poor template designs, and I say this with no disrespect as I respect and congrats all you guys at CC for an awesome script. Just speaking my personal opinion, that if CC was to come out with a better presentation as far as templates as in others, it would blow most carts out there. Well hopefully we will get more developers like shopdev to make us some new great skins. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 13, 2015 Share Posted March 13, 2015 I wasn't even aware that the fusion update was available to remove call home. So the fusion update removes the call home, but if upgraded the Vector won't work? Is that what your trying to explain, because I currently have the Vector working fine for me for now, but of course with the old fusion that calls home. As I understand it both skins will work until CC makes some future change that breaks them. But Vector is not responsive - that's important. Not sure how to designate a mobile skin with v6 using a v5 skin???? No to both of you ! Unfortunately it hasnt been widely publicised but anyone running Blueprint or Vector skins has to upgrade the Fusion plugin or you will find that their skins will immediately or very quickly stop working. My understanding is that the licencing server is due to be switched off on this date Ian Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 13, 2015 Author Share Posted March 13, 2015 Maybe I didn't express it correctly. I've already upgraded to v2.4 Fusion and have it installed. SO until CC's future upgrades at some point break Blueprint, it should work - isn't that correct?? Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted March 13, 2015 Share Posted March 13, 2015 Hey lan, thanks for the reply. But my questions was if the vector will continue to work for me if I upgrade fusion, well at least for now and until I figure out another route... Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 13, 2015 Share Posted March 13, 2015 Maybe I didn't express it correctly. I've already upgraded to v2.4 Fusion and have it installed. SO until CC's future upgrades at some point break Blueprint, it should work - isn't that correct?? Yes although it is more likely that functionality will be added (which is already happening) that then wont be included in these skins. Of course there is always a chance that something will break them completely !Hey lan, thanks for the reply. But my questions was if the vector will continue to work for me if I upgrade fusion, well at least for now and until I figure out another route... Yes Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted March 13, 2015 Share Posted March 13, 2015 Ok lan, thanks I got it. I just upgraded fusion and still working, well for now lol.. Thanks again! Quote Link to comment Share on other sites More sharing options...
jasehead Posted June 26, 2016 Share Posted June 26, 2016 Just to note that I've tried the edits and code snippet to show only featured products in stock. I did find that the featured box didn't appear occasionally (because the result wasn't in stock?) Any way to get cubecart to requery? 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.