Jump to content

zombiesbyte

Member
  • Posts

    50
  • Joined

  • Last visited

Everything posted by zombiesbyte

  1. I'm more of a bootstrap kinda-guy but decided to try and work with Foundation, something I've not done before and so far it's been quite straight forward. I still feel there's a missing size in between small and medium but it's cool. I'm trying to implement tabs and have struggled to get them working. I realised after about 30 minutes that I was working with the wrong version Anyway... Foundation 6 has a simpler form of tab insertion over 5 but after setting up the html as illustrated on their page the tab buttons just work like jump to links with no hidden tab data (i.e. everything is just served up on the page without needing to toggle the tab titles). Then I found a part that said I needed to include js/foundation.tabs.js (http://foundation.zurb.com/sites/docs/javascript.html#initializing) I don't have this file in the CC distro so I downloaded the foundation-6.2.3-complete from the Foundation website only to find that it is still missing foundation.tabs.js. A google search hasn't revealed anything. What am I missing? Also, as a side question, I find this link a bit disconcerting as it hijacks your browser back button. http://foundation.zurb.com/sites/docs/v/5.5.3/components/tabs.html If you insert the address above into a tab with some history on the back button then load the page. After the page is loaded I challenge you to go back using the browsers back button. You'll see your back button is constantly hijacked. I just want to make sure that this foul play is not used in the latest version of Foundation 6? Cheers James
  2. Hi Guys Just thought I'd post a solution to an issue I was facing. I couldn't find any solutions on here so thought this may come in handy for anyone facing the same problem. In the admin area of CC, if you try to use a Font Awesome (or any element that uses <i> I believe) FCK Editor (the WYSIWYG / Rich Text Editor) it will strip these tags without warning. I just happened to notice they were missing today so here's the fix: In your /includes/ckeditor folder there should be a config.js file. Add the following line at the bottom before the closing brace: // ALLOW <i></i> config.protectedSource.push(/<i[^>]*><\/i>/g); So for a clearer idea for those who don't do a lot of programming here's the default updated version: /** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { config.filebrowserBrowseUrl = document.location.pathname+'?_g=filemanager&mode=fck'; config.protectedSource.push(/{[\s\S]*?}/g); config.extraPlugins = 'showprotected'; config.filebrowserWindowHeight = 500; config.filebrowserWindowWidth = 650; config.allowedContent = true; // ALLOW <i></i> config.protectedSource.push(/<i[^>]*><\/i>/g); }; One final thing is that the editor may have cached the previous settings so I would advise a clear out of your browser history or Ctrl + F5 a few times with the editor open in your admin area before inserting your font-awesome icons into the source code view. Remember to switch back from source view to normal view before saving and testing your new awesome page Happy days Cheers James Mod: I think this is an open and close thread so feel free to mark it so
  3. Hi Stupid question but I can't seem to find the admin section for adding social media links, can anyone let me know where it is please? I see the main.php template file has {$SOCIAL} and from another post on this forum it was suggested that this was populated from element.social.php template but that looks like it pulls the data from somewhere else and I can't work out if it's a hardcoded config file somewhere, another template file or within the admin panel. Cheers James
  4. Thanks bsandall, I use bitbucket (and a bit of git) to keep track of other projects so I have a little experience with some parts of the version control although I try to stay clear of complicated development trees (start to look like the London Underground map lol). I suppose in my mind I had the next round of changes being so far removed from this current version that a version control system would just show too much difference to be of any use. I guess I'm just fearing the lack of control I have and the unknown Good suggestion, I'll just go for that then PS: I'm using XAMPP for local development but this will be uploaded and sit on a hosted Linux environment (LAMP).
  5. haha " I't " that's like wheels within wheels, nice one Always makes me laugh when I think about how the word "okay" has been shortened... English word: "Okay" 20th Century : "OK" 21st Century: "k"
  6. Ok, managed to hack a bit to get it to work line 1081 gui.class.php /** * Display random products box */ public function displayRandomProduct($p=0) { return $this->_displayRandomProduct($p); } private function _displayRandomProduct($p=0) { ... } Added a public method that calls the original private method (I didn't want to change anything so this is a passive solution). Then I added this to the smarty document scope by assigning it to the global Line 79: cubecart.class.php /** * Show the home page */ public function displayHomePage() { ... $GLOBALS['smarty']->assign('LATEST_PRODUCTS', $products); $GLOBALS['smarty']->assign('RANDOM_FEATURED', $GLOBALS['gui']->displayRandomProduct() ); ... } I don't actually use the template variable $RANDOM_FEATURED as it is enough just to append the rendered data to the smarty global for it to work. I'm still not exactly sure how these smarty templating engine works but I think I understand kind of what is going on here. It works anyway so it's a win. Just to clarify what I've done here's the 4 files in question main.php {include file='templates/box.errors.php'} {include file='templates/box.progress.php'} {$PAGE_CONTENT} //<- this pulls in content.homepage.php {include file='templates/box.home_ad_grp.php'} {include file='templates/box.popular.php'} content.homepage.php {include file='templates/box.banner.php'} //<- this pulls in box.banner.php {include file='templates/box.latest.php'} box.banner.php {include file='templates/box.featured.php'} //<- this pulls in box.featured.php box.featured.php {if $featured} //... <- this now has information (previously it did not) {/if}
  7. There's always the state of confusion when it comes to variable name and the thin line of making_them_readable (or makingThemReadable) and understandable. I used to adopt the underscore seperation route but found that does add the additional length and since using lowerCamelCase it has helped as it usually forces length restriction. But yes I think we've all hadOneOfThoseCrazyLengthVariablesThatYouJustWantToMakeSureYouKnowWhatItDoes. As for the spelling.. there's tons of spelling mistakes in the language anyway so why worry. Color for one haha although logically I favour the American spelling as I tend not to pronounce "colour" with marbles in my mouth. I don't think the English language has any power to demand consistency or accuracy as it's full of them itself so all's forgiven as far's I'm concerned (notice my forced abbreviation there!).
  8. Thanks bsmither, That explanation makes sense, the logic of what happens doesn't I may need to start digging for ways to change this in the controller as you're right, everything should go through the controller and flood out down the chain of templating rather than it being picky. I don't know what implication it has on performance but by the nature of the templates they should be able to address their variables at any point they are rendered since the view is last. Hmm, 6.1 makes me nervous as I'm just starting to get things shaped the way I want. It might be better asking this on a new thread but I've changed a few bits in the core files and not really sure how to manage these changes when upgrading/updating CC in the future. You sound like you probably pimped your ride too and wondered how you kept tabs on all of your customisations/improvements that couldn't be wrapped up in some kind of plugin/hook thingy (sorry, still working on understanding hooks). Cheers James
  9. As a developer I get annoyed at how the obvious issues are never addressed. I'd fix them myself but this isn't as simple as 'forking' haha.. let me explain (and vent) HTML IMG tag Yes, it's been with us for quite some time, provided us with the ability to decorate our websites and now even provides us with SVG embedding. but I feel like there's a great miss-understanding when it comes to the tag for how we have just left it in it's raw unchanged state and then demanded that it stays in this state for good programming practice. I am of course referring to the attributes of width and height. Early HTML was all about, well the HTML but the focus of structure and style has been separated to HTML handling structure and CSS handling style (in general). With the width and height attributes being insisted puts me in a state of confusion as I write my width and height in my CSS. For responsive design to be at the heart of 99% of everything it seems, it is quite impossible to add a width and height as it would be unknown. So maybe it's the actual width and height of the image that needs specified which still doesn't explain the necessity of such attributes as the information is irrelevant to any browser since the style in CSS is applied as a dominant setting. Even if CSS hadn't addressed the image size the browser has the information at it's disposal even before the entire file has been downloaded and at worse case this is naturally extended from a small block area. Other attributes confuse me too as the alt was originally an alternative text placeholder in case the image hadn't loaded but most browsers decided to use this information as a title attribute. The title attribute was supposed to be the only snippet that appeared on interaction (i.e. hover-over). There was some accessibility attributes that seem to have disappeared which allowed for full descriptions of images so that screen-readers and alike could use them, from memory I think one was "longdesc=". IMG tag in my opinion should be a simple tag that offers no width and height but provides an alt (but not a title since browsers seems to use these interchangeably). XHTML Vs HTML I learnt a long time ago about the differences of XHTML over HTML and I still see people putting XHTML/XML style into HTML documents and the strange thing is they can't explain why when challenged. CC hasn't got any so I'm at peace here CSS I'm not going to go into too much detail here as this one is obvious: border-width: 2px; border-style: solid; border-color: #000000; background-size: cover; background-image: url('myimage.jpg'); background-color: #000000; font-size: 12pt; font-style: italic; font-color: #000000; PHP Again this is another obvious one which has me confused, did they not stop to check the ordering: in_array( {needle}, {haystack} ); strstr( {haystack}, {needle} ); strpos( {haystack}, {needle} ); I know that there's lots of chatter about this one but I'm referring to the official php manual analogy of needle and haystacks and find the reason why they have done it this way isn't as easy as finding a "haystack in a needle" I'm not even sure that they stick to string functions and array functions using these orders either but I can't remember which one breaks this system. Final thoughts This was all intended to be light hearted and although it does put my OCD on the boil at times I don't spend too long sharpening my knives at these inconsistencies... I hope you had fun laughing at my pain
  10. You may get your solution from this post if you could also answer the questions I had. I think it may be better to work from one thread for this since it's going to get confusing and it looks like you both have the same question. I would say that this is probably a templating solution (i.e. functionality/experience) rather than there being something wrong with CC (i.e. technical fault) so it's probably best to work from the linked thread. Sounds just like a few changes to the way the output occurs. Can you post a screen shot as I don't have my store setup for VAT? Cheers James
  11. Hi Shayne Yes, there is a simple tag to include but it may be easier if you post the code from your <nav> section (or where-ever it is). If you don't know where to look then just open your browser to the page and right click and copy the source code and paste it here using the code [<>] button from the reply box tool bar. Cheers James
  12. Hi Bear Aka Wil I've tried to understand what it is you are asking and from what I can gather, they already are drop-down boxes when you switch to mobile. Can you elaborate on your request (maybe draw it out on paper and take a photo and attach it here). Cheers James
  13. Claudia M Just to confirm: I can see "Previous Item :: Next Item" shown at the top right of each of the product pages. I would try perhaps opening a different browser or using the private/incognito tab (I believe this doesn't use cache). Cheers James
  14. made it all the way down before I realised this was solved. Mark as solved please
  15. Hi Androidicus I'm also recently a new member to CC too. I'm not currently VAT registered and I'm not sure if I can help much but thought I'd reply anyway as I had a couple of questions regarding your query/issue. 1. I presume that a checkout by law has to have a VAT calculation shown at this point which is why it has been done this way (I may be wrong)? 2. Shipping fees in some cases are VAT free/exempt such as Royal Mail so I imagine that there are some VAT settings somewhere to control this, there may be an option of showing how VAT is displayed upon calculation at basket stage. 3. Is the checkout showing the right information (the way you want it to be shown or is it both the basket and checkout)? If it's something that isn't available as a setting in the admin then I imagine it should be fairly easy to amend on the page template but it may help to know about the 3 questions above before you go down that route. I'm still developing the shop and haven't got to working with the basket and checkout stages just yet but I'll certainly try and help if you need it. I noticed the date you posted so not sure if this is a redundant question now.
  16. Hi I've not had too much experience with smarty templating engine before so this is probably a noob question. I want to use main.php to pull in the content.homepage.php template (which it does) but then... within content.homepage.php use smarty includes to pull in box.banner.php and within box.banner.php again use smarty to include box.featured.php. From what I've read on the web nested includes work fine but the variables don't seem to be set i.e. $featured Any tips on what I could be missing? This works: main.php -> {include file='templates/box.banner.php'} -> {include file='templates/box.featured.php'} This doesn't work: main.php -> {$PAGE_CONTENT} (which uses content.homepage.php) -> {include file='templates/box.banner.php'} -> {include file='templates/box.featured.php'} I'm presuming it has to do with the $PAGE_CONTENT (constant? What's with the uppercase anyway?) being polluted in a non-smarty way If {$PAGE_CONTENT} variable is relevant to the page you're on then I presume this is switched out for a standard smarty {include file='the.page.name.php'} but I'm unsure as it happens at run time.
  17. Thanks again bsmither. I think I have enough information to make a start on things.
  18. Thanks bsmither for answering in detail. I have to admit, this sounds like organised chaos when it comes to both the module/Plugin/plugin concept AND the naming of these things. On a more positive note, I have had a look at the code for CC in more detail and although it doesn't seem to be particularly well structured in terms of OOP the code is clean, lean and clear and has a number of admirable points in terms of advanced php practices which I don't see very often. I just thought I'd say that as I felt quite blessed after seeing some of the OpenSource eCom projects out there. Anyway, I think it's going to take me quite a while to grasp what you've said (not anything to do with your explanation) although some of it has answered questions I had. By "visual map" I mean something like a flow chart explaining the entry points of each of the extensions and what they effect. Didn't realise there wasn't a way to uninstall an extension... so would it be customary to include an uninstall script within the admin area if the plugin/extension had it's own sections? Example project: I may start my first mod as a way to turn off the page heading on a document page as it doesn't grant much control if you don't want to include it or change it from becoming a <h1> tag (i.e. you want to add a css class on only one of your 'documents'). Since this is a modification (additional field in DB, additional form tickbox on admin view, additional model & controller tasks, language entry for labels (I imagine)) based on this explanation, what kind of extension type would this be? Secondly, since all the skins will be different (potentially) I presume that there will need to be clear instructions provided on how to manually update the template to allow for the condition checking of if the h1 should be turned off? Am I right in presuming all of this? Kind regards James
  19. Hi Just want to clarify a couple of things with me being new to CC. I'm on version 6 and trying to understand the market place a bit better since I'm finding it slightly confusing. This may just be a case of me understand the terminology... So my installation of CC has a nice admin area where I can manage everything I need to but I'm missing a few features I'd like to develop. Before I start down this route I need to understand if and how I may perhaps share these on the marketplace as it may be something that others would find beneficial (I haven't wrote anything yet but wanted to get it straight in my head and start out on the right foot). The section under "PLUGINS" has a link to my list of installed "plugins" but the marketplace goes to "extensions". This is my first question. Are "extensions" the same thing as "plugins"? If they are then the extensions menu also has a sub section of plugins together with other categories which is confusing. If I wanted to write a module (I'm calling them module as I can't distinguish between all the terminology used) then this would have a complete set of installation instructions for CC to automatically install and update DB, PHP etc and probably write directories specific to the modules requirements etc. Is this what a plugin is and is a plugin a particular type of extension? If I wanted to write a code snippet, a product feed or a skin then these would all be regarded as an extension but not regarded as a plugin? Also is a code snippet something that is used under "Manage hooks" in the admin? I there a visual map or something? I'm struggling to write the questions so I'll stop here until I understand what all of this means.
  20. Thanks Al. You're making it sound easier to learn Foundation which is probably the more sensible thing to do upon reflection (and a bit of sleep). Your remark about Foundation being similar to Bootstrap has turned me At least I have my answers should it not work out and I need to switch back to Bootstrap... Thanks for both responses! I appreciate it guys ++ How do I mark this thread as solved/resolved?
  21. Thanks so much bsmither, appreciate the reply and this sounds great! Foundation was always one of them cool looking solutions but my career pushed me down the Bootstrap route so I'm more fluent with that, sounds like a good excuse to enter into the foundation school though when I get a chance to rebuild the theme after launch... not that there's anything wrong with Bootstrap of course, but, always good to have an alternative when taking over the world It's way past my bed time (3:40am here in UK) but I can't switch off. Cheers James I'm liking the emoticons
  22. Hi, I am new to the forum and new to CC I want to start creating my own template/skin but want to use bootstrap (the CSS framework I mean) over foundation as I have no experience with it and I've got an extremely tight dead-line* Would it just be a case of creating a new directory in the skins folder and start re-building each page using an existing theme as a base? *I've just switched from OpenCart so have a lot of the page content done so I can fit it into CC if I don't have a CSS framework to learn on top of all of this work. Kind regards James
×
×
  • Create New...