Guest BubbaSully Posted September 8, 2011 Share Posted September 8, 2011 I upgraded a non-operational v4 website to v5 (Not CC's fault....bad consultants fault). That being said I did not go with a test environment since I did not have a production site. I assumed that the skin would automatically transfer. With the amount of change by CC to the skins folder my assumption is not true. I am making some headway but need to know where the section code is located. Sections are being called in the form of {$section}, see below for examples. {$SEARCH_FORM} {$CATEGORIES} {$SALE_ITEMS} I have viewed every file within reason except for the encrypted files. If someone knows how to view those as well, please let me know. Thanks in advance for all who help!!! Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted September 8, 2011 Share Posted September 8, 2011 I assume you're referring to the template files for the search, categories, and sale boxes from the main template.... {$SEARCH_FORM} = [your_skin_name]/templates/box.search.php {$CATEGORIES} = [your_skin_name]/templates/box.navigation.php {$SALE_ITEMS} = [your_skin-name]/templates/box.sale_items.php Quote Link to comment Share on other sites More sharing options...
Guest BubbaSully Posted September 8, 2011 Share Posted September 8, 2011 I assume you're referring to the template files for the search, categories, and sale boxes from the main template.... {$SEARCH_FORM} = [your_skin_name]/templates/box.search.php {$CATEGORIES} = [your_skin_name]/templates/box.navigation.php {$SALE_ITEMS} = [your_skin-name]/templates/box.sale_items.php Thank you very much!!! I was looking in the content.search.php file....This was my biggest roadblock and I feel like a real "ID10T"....Thank you again!!! Quote Link to comment Share on other sites More sharing options...
Guest BubbaSully Posted September 9, 2011 Share Posted September 9, 2011 I assume you're referring to the template files for the search, categories, and sale boxes from the main template.... {$SEARCH_FORM} = [your_skin_name]/templates/box.search.php {$CATEGORIES} = [your_skin_name]/templates/box.navigation.php {$SALE_ITEMS} = [your_skin-name]/templates/box.sale_items.php Do you know where the file is that defines the calls to other php files? Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted September 13, 2011 Share Posted September 13, 2011 Do you know where the file is that defines the calls to other php files? Not sure what you mean. Which bit of code are you looking at? Or if you mean is there a file that basically lists all the placeholders in the template and matches them up to a file, then no, there isn't a single file that does this (as far as I know). The placeholders all get content assigned to them somewhere in the various class scripts. Quote Link to comment Share on other sites More sharing options...
Guest BubbaSully Posted September 15, 2011 Share Posted September 15, 2011 Do you know where the file is that defines the calls to other php files? Not sure what you mean. Which bit of code are you looking at? Or if you mean is there a file that basically lists all the placeholders in the template and matches them up to a file, then no, there isn't a single file that does this (as far as I know). The placeholders all get content assigned to them somewhere in the various class scripts. What I am asking is if there is a file, website, forum, etc... that contains the mappings for the topic discussed on this thread. Put another way is there a list using any medium for the following with the corresponding php files: {$SEARCH_FORM} {$CATEGORIES} {$SALE_ITEMS} etc........... Hopefully I cleared your confusion :-) Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted September 15, 2011 Share Posted September 15, 2011 There's no such list that I'm aware of, so here goes.... SMARTY placeholders in [skin_name]/templates/main.php {$SHOPPING_CART} = box.basket.php {$CURRENCY} = box.currency.php {$SITE_DOCS} = box.documents.php {include file='templates/box.errors.php'} = box.errors.php (obviously) {$RANDOM_PROD} = box.featured.php {$LANGUAGE} = box.language.php {$CATEGORIES} = box.navigation.php {$MAIL_LIST} = box.newsletter.php {if isset($POPULAR_PRODUCTS)}{$POPULAR_PRODUCTS}{/if} = box.popular.php (this one has a condition that checks if "show popular products" has been set in the admin dashboard) {if isset($CHECKOUT_PROGRESS)}{$CHECKOUT_PROGRESS}{/if} = box.progress.php (shows the checkout steps on checkout pages: 1. Basket - 2.Checkout - 3. Payment - 4. Complete) {$SALE_ITEMS} = box.sale_items.php {$SEARCH_FORM} = box.search.php {$SESSION} = box.session.php {if isset($SKIN_SELECT)}{$SKIN_SELECT}{/if} = box.skins.php (condition checks if "allow users to change front-end skin" has been set to Yes in the dashboard) {$COPYRIGHT} = loads the content as entered in the dashboard under Store Settings > Copyright {$PAGE_CONTENT} = loads the page content based on what URL you are looking at {$STORE_URL} = the base URL of your store, eg. "http://domain.com" or "http://www.domain.com/shop" {$SKIN_FOLDER} = the folder name of the skin your store is currently using, eg. "vanilla" {$SKIN_SUBSET} = the folder name of the skin subset/style your store is currently using; only applicable if your skin has subsets logo for skins with subsets: <a href="{$STORE_URL}/index.php"><img src="{$STORE_URL}/images/logos/{$SKIN_FOLDER}-{$SKIN_SUBSET}.php" alt="{$META_TITLE}" /></a> logo for skins without subsets: <a href="{$STORE_URL}/index.php"><img src="{$STORE_URL}/images/logos/{$SKIN_FOLDER}.php" alt="{$META_TITLE}" /></a> template files for page content ({$PAGE_CONTENT} in the main.php template file) and corresponding URLs content.category.php = index.php?_a=category&cat_id=1 content.certificates.php = index.php?_a=certificates content.contact.php = index.php?_a=contact content.document.php = index.php?_a=document&doc_id=1 content.homepage.php = index.php content.login.php = index.php?_a=login content.product.php = index.php?_a=product&product_id=1 content.recover.php = index.php?_a=recover content.recovery.php = index.php?_a=recovery content.register.php = index.php?_a=register content.search.php = index.php?_a=search checkout pages content.checkout.php = index.php?_a=basket content.checkout.confirm.php = index.php?_a=confirm (step 2 of the checkout; for registered users shows a selection of saved addresses, for unregistered users shows a form to enter an address) content.gateway.php = index.php?_a=gateway customer account pages content.addressbook.php = index.php?_a=addressbook content.downloads.php = index.php?_a=downloads content.newsletter.php = index.php?_a=newsletter content.orders.php = index.php?_a=vieworder content.profile.php = index.php?_a=profile content.receipt.php = index.php?_a=vieworder&cart_order_id=111111-111111-1111 Quote Link to comment Share on other sites More sharing options...
Guest BubbaSully Posted September 15, 2011 Share Posted September 15, 2011 Viola, thank you very much! I greatly appreciate you taking the time to document all that information for me! I hope this will help out other CC members since CC does not have any relevant documentation - BubbaSully :-) Quote Link to comment Share on other sites More sharing options...
Guest DM613 Posted September 26, 2011 Share Posted September 26, 2011 If you mean whether the file that lists all the placeholders correspond to the model, and also the file, then no, not a single file that does this (to my knowledge). Installing a sign of all the content they will receive a different class of scripts. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 26, 2011 Share Posted September 26, 2011 I've managed by trial and error to adjust all the cosmetic settings I want on Kurouto except for the gray boxes on the homepage for Categories, Mailing List, Shopping Cart, Featured Product, and Popular Products. The templates show them as <h3> as far as I can tell. Can someone show me the code in the Styles that I need to change to get a different color besides the gray? That gray is consistent across all the skin color choices, so I would have expected to find it in the Common file. On another note, I had to add a CSS text code to the Styles to get rid of the gray default text, and then had to add the <span class="text"></span> to all the appropriate lines in the Template files. I haven't seen that anyone else mentioned this problem. Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted September 27, 2011 Share Posted September 27, 2011 The <h3>s on the boxes have a background colour in common.css (line 145) and a background image in the various style layout.css files (line 31 for Blue). The default grey text colour is set in common.css line 9 for the body element. You might want to take a look at the Firebug plugin for Firefox - it makes this sort of thing MUCH easier. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 27, 2011 Share Posted September 27, 2011 The <h3>s on the boxes have a background colour in common.css (line 145) and a background image in the various style layout.css files (line 31 for Blue). The default grey text colour is set in common.css line 9 for the body element. You might want to take a look at the Firebug plugin for Firefox - it makes this sort of thing MUCH easier. I sure wish I had asked about this a lot sooner! The thing I don't understand about the logic of the styles folders is the lines that are in common.css, such as these, that one would expect to find in the various color files. IF I were to allow the customer to set their own skin I could have blue text on an orange skin, instead of the brown text that goes with my orange skin, IF I set my default text color in common.css. Thanks for helping out a very green newbie! Hopefully this will help someone else. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted September 27, 2011 Share Posted September 27, 2011 Awesome. Great work with this!! :) Quote Link to comment Share on other sites More sharing options...
Guest Posted September 27, 2011 Share Posted September 27, 2011 Since I haven't seen it mentioned thus far, most of the boxes and content are generated/populated in the /classes/gui.class.php file. That file calls other classes as necessary to generate the pages for the most part. So if you want to change the behavior of a section, that's where to start looking. BTW, thanks for the great list Viola. We'll see about pulling that and some more info together to get some developer docs prepped. We've just been so busy squashing bugs and such that docs have to be put on the back burner. Once things are more stable...and they're already MUCH closer than they were, we'll work more on developer docs and such. Thanks! :w00t: Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 14, 2011 Share Posted November 14, 2011 Since I haven't seen it mentioned thus far, most of the boxes and content are generated/populated in the /classes/gui.class.php file. That file calls other classes as necessary to generate the pages for the most part. So if you want to change the behavior of a section, that's where to start looking. BTW, thanks for the great list Viola. We'll see about pulling that and some more info together to get some developer docs prepped. We've just been so busy squashing bugs and such that docs have to be put on the back burner. Once things are more stable...and they're already MUCH closer than they were, we'll work more on developer docs and such. Thanks! How do I use $this->_displayRandomProduct(); from the /classes/gui.class.php file to make the sales item box show one random product on sale the way the Featured Item does? Or am I totally wrong in thinking this has anything to do with it? Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted November 15, 2011 Share Posted November 15, 2011 How do I use $this->_displayRandomProduct(); from the /classes/gui.class.php file to make the sales item box show one random product on sale the way the Featured Item does? Or am I totally wrong in thinking this has anything to do with it? It might actually be possible to do that in the template. I found a thread about it in the Smarty forum: http://www.smarty.net/forums/viewtopic.php?p=60501 So in your box.sale_items.php template file you should have a foreach loop like this: I haven't tested this myself so let us know how it goes.{foreach from=$PRODUCTS item=product} <li> <a href="{$product.url}" title="{$product.name}">{$product.name}</a><br /> {if {$product.saving}}<span class="saving">{$LANG.catalogue.saving} {$product.saving}</span>{/if} </li> {/foreach} which you would replace with this: {assign var=random value=$PRODUCTS|array_rand} <li> <a href="{$PRODUCTS.$random.url}" title="{$PRODUCTS.$random.name}">{$PRODUCTS.$random.name}</a><br /> {if {$PRODUCTS.$random.saving}}<span class="saving">{$LANG.catalogue.saving} {$PRODUCTS.$random.saving}</span>{/if} </li> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 15, 2011 Share Posted November 15, 2011 How do I use $this->_displayRandomProduct(); from the /classes/gui.class.php file to make the sales item box show one random product on sale the way the Featured Item does? Or am I totally wrong in thinking this has anything to do with it? It might actually be possible to do that in the template. I found a thread about it in the Smarty forum: http://www.smarty.net/forums/viewtopic.php?p=60501 So in your box.sale_items.php template file you should have a foreach loop like this: I haven't tested this myself so let us know how it goes. {foreach from=$PRODUCTS item=product} <li> <a href="{$product.url}" title="{$product.name}">{$product.name}</a><br /> {if {$product.saving}}<span class="saving">{$LANG.catalogue.saving} {$product.saving}</span>{/if} </li> {/foreach} which you would replace with this: {assign var=random value=$PRODUCTS|array_rand} <li> <a href="{$PRODUCTS.$random.url}" title="{$PRODUCTS.$random.name}">{$PRODUCTS.$random.name}</a><br /> {if {$PRODUCTS.$random.saving}}<span class="saving">{$LANG.catalogue.saving} {$PRODUCTS.$random.saving}</span>{/if} </li> It works just fine!! Thank you so much, Viola! I did take the <ul><li></li></ul> out, as it didn't seem necessary for just one product to have the little box image and the indent there. Any suggestion about how to get the photo of the current random item to show as well? Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted November 15, 2011 Share Posted November 15, 2011 It works just fine!! Thank you so much, Viola! I did take the <ul><li></li></ul> out, as it didn't seem necessary for just one product to have the little box image and the indent there. Any suggestion about how to get the photo of the current random item to show as well? You want Robsta's "Sale Items with images" plugin for that: http://www.cubecartforums.org/index.php?showtopic=15082 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 15, 2011 Share Posted November 15, 2011 It works just fine!! Thank you so much, Viola! I did take the <ul><li></li></ul> out, as it didn't seem necessary for just one product to have the little box image and the indent there. Any suggestion about how to get the photo of the current random item to show as well? You want Robsta's "Sale Items with images" plugin for that: http://www.cubecartforums.org/index.php?showtopic=15082 I installed Robsta's free plugin, and it works as is, as long as you follow his directions to add to the common styles sheet. It will scroll a marquee, too, if that's what someone wants, with some additional provided code. <div id="sale_products"> <h3>{$LANG.catalogue.title_saleitems}</h3> {foreach from=$PRODUCTS item=product} <div class="SaleProdEa"><a href="{$product.url}" title="{$product.name}"><img src="{$product.image}" alt="{$product.name}" /></a><br/> <a href="{$product.url}" title="{$product.name}">{$product.name}</a><br /> <span class="saving">{$LANG.catalogue.saving} {$product.saving}</span> </div> {/foreach} </div> And it works with this combination of your code and his. Aparently I did have to increase the number of Sales items to show in the General Settings to 20 to get all my sales items to rotate randomly. <div id="sale_products"> <h3>{$LANG.catalogue.title_saleitems}</h3> <br/> {assign var=random value=$PRODUCTS|array_rand} <a href="{$PRODUCTS.$random.url}" title="{$PRODUCTS.$random.name}">{$PRODUCTS.$random.name}</a><br /> <div class="SaleProdEa"><a href="{$PRODUCTS.$random.url}" title="{$PRODUCTS.$random.name}"><img src="{$PRODUCTS.$random.image}" alt="{$PRODUCTS.$random.name}" /></a><br/> {if {$PRODUCTS.$random.saving}}<span class="saving">{$LANG.catalogue.saving} {$PRODUCTS.$random.saving}</span>{/if} </div> </div>} I did get a little confused when installing Robsta's plugin. I extracted it to the wrong place evidently and had to move the files to the proper plugin folder. Other than that it was great! And it's FREE!! Yea Robsta and Viola!! I love it! Quote Link to comment Share on other sites More sharing options...
markscarts Posted February 7, 2012 Share Posted February 7, 2012 We'll see about pulling that and some more info together to get some developer docs prepped. LOL good luck with all the work you guys have to do on the coding end! Are you really going to stop and author documentation? I hope so, but . . . Just a reminder, if you do, PLEASE submit it at cubecartforims.org documentation project. As with CC3 and CC4, there is no documentation shipping with CC5 and we are in dire need of folk to contribute to the documentation there for CC5. Viola, would you consider sending the info above to Rob at cubecartforums.org, and maybe shore it up with some info on gui.class.php as well? It would be a big help to the community IMO . . . Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 3, 2012 Share Posted March 3, 2012 I've been very pleased with this code, but I've just put a Global discount % on the store. The previous On Sale per product items are still marked with a sale price on the Product Price tab, and I want to leave them that way. If you click on our Featured Sale Items in the Menu you see the currently discounted prices for only these featured items - again what I want. But I had to temporarily take the {$SALE_ITEMS} smarty placeholder off of main.php, because it was randomizing ALL products, since they are all on sale right now. Can the code be adjusted to only choose from items individually marked with a Sale Price? If it's too involved I'm more than happy with it the way it is. Quote Link to comment Share on other sites More sharing options...
markscarts Posted March 30, 2012 Share Posted March 30, 2012 Sorry for the light "hijacking" of this thread, but I just want to say "thank you" to VIOLA for submitting some smarty template info to CCF.org's CubeCart 5 documentation project! Good work, Viola. http://www.cubecartforums.org/docs/CubeCart-v5/customising-cubecart/smarty-skin-breakdown.html 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.