Jump to content

Mican Skin Help (PLEASE)


WalstonNet
 Share

Recommended Posts

Ok, so I am using Cube Cat Version 5 (I think the server admin installed a new version rather than just upgrading from 4, but I can't be sure) for one of my clients.

 

I am using the Mican theme, which as you can see I have customized a little bit. But, I desperately need to figure out how to add the "documents" menu that is at the bottom of the page to the top of the page, to the right of the search container. Of course I want to center it horizontally, and vertically (LOL!)

 

Then at the bottom, I need to add "home" and "contact" links to the documents menu (anywhere the documents menu displays, so top & bottom) and then I need to display a small image to the right of the documents menu, this image:

 

tagline.png

 

The weird thing is, that in box.documents.php, it is set to show home and contact links, but it isn't doing so  :-(

<ul class="documents">
  {if isset($DOCUMENTS) && count($DOCUMENTS) > 0}
  	{foreach from=$DOCUMENTS item=document}
  <li><a href="{$document.doc_url}" title="{$document.doc_name}" {if $document.doc_url_openin}target="_blank"{/if}>{$document.doc_name}</a></li>
    {/foreach}
  {/if}
  {if isset($CONTACT_URL)}
  <li><a href="{$CONTACT_URL}" title="{$LANG.documents.document_contact}">{$LANG.documents.document_contact}</a></li>
  {/if}
  {if isset($HOME_URL)}
  <li><a href="{$HOME_URL}" title="{$LANG.documents.document_home}">{$LANG.documents.document_home}</a></li>
  {/if}
</ul>

That should produce home & contact links right? Am I doing something wrong?

 

Is there anyone on here that is good with template customization that could PLEASE help me with this? This is like the very last thing I need to do before adding a product to text it out before handing it over to my client & I am desperate for some help, so any help someone can give would be GREATLY APPRECIATED!

 

So to recap (LOL!), I need to add home & contact links permanently to the documents menu, get the documents menu to display at to top in the white space to the right of the search container, and add the tagline image (custom made by American workers...) to the bottom to the right of the documents menu.

 

I think I've tried everything, been on a million cube cart customization sites, forums etc, now it's time to post & actually ask for help. So if there's anyone who can help me with this, I'm begging, please. (LOL!, but not kidding)

 

arns.jpg

 

 

Link to comment
Share on other sites

If you are editing this skin on a localserver, then at the end of the file box.documents.php, add {debug}. When the template engine calls and renders this template, there will be a pop-up window that lists all the data that CubeCart collected and gave to the template engine (Smarty).

 

If you are not developing locally, there's a way to add an IP address to allow the showing, but we can look at that later.

Link to comment
Share on other sites

This is the original code for the Mican main.php template.:

<div id="header">

  <div id="boxes">

    {$SEARCH_FORM} {$LANGUAGE} {$CURRENCY}

  </div>

  <div id="cart_box">

    {$SESSION}

    {$SHOPPING_CART}

  </div>

</div>

 

Obviously, you have removed {$LANGUAGE} and {$CURRENCY}, and I hope you have added {$SITE_DOCS}.

 

When you ask the browser to show you the HTML source it got from the server, can you find the HTML (or definite lack of) code where the document links should be?



Ok, definite lack of any evidence that the {$SITE_DOCS} placeholder is there.

Link to comment
Share on other sites

In the file /controllers/controller.index.inc.php, find the group of statements that instantiates $GLOBALS['smarty']. After that group add:

 

$GLOBALS['smarty']->debugging_ctrl = ($_SERVER["REMOTE_ADDR"] == 'IP_ADDRESS') ? 'URL' : 'NONE';

 

Where IP_ADDRESS is the IP address your ISP has assigned to you.

 

Then (if this works), call your site with www.domain.com?SMARTY_DEBUG

Link to comment
Share on other sites

Ok, I did what you said in that file, this is what I did:

 

//Initialize Smarty
$GLOBALS['smarty'] = new Smarty();
$GLOBALS['smarty']->compile_dir  = CC_SKIN_CACHE_DIR;
$GLOBALS['smarty']->config_dir   = CC_SKIN_CACHE_DIR;
$GLOBALS['smarty']->cache_dir    = CC_SKIN_CACHE_DIR;
$GLOBALS['smarty']->error_reporting = E_ALL & ~E_NOTICE;
//Initialize debug
$GLOBALS['smarty']->debugging_ctrl = ($_SERVER["REMOTE_ADDR"] == '50.28.3.33') ? 'URL' : 'NONE';

 

Then I went to  http://www.arnswoodshop.com?SMARTY_DEBUG in the browser.What that did was just brought up the home page, but it didn't show me any errors or anything.

 

Now I'm more confused than before, LOL!

Link to comment
Share on other sites

Well, that didn't work.

 

Try this: at the bottom of the file, above the offline() statement:

 

if($_SERVER["REMOTE_ADDR"] == '50.28.3.33') Smarty_Internal_Debug::display_debug($GLOBALS['smarty']);

 

Remove what was earlier added. And you don't need the ?SMARTY_DEBUG in the URL.

Link to comment
Share on other sites

Ok, done. It didn't do anything either. What is it supposed to be doing exactly?

 

See I was thinking to accomplish adding the documents menu to the top part, that I would just copy the code that puts it in the bottom of the page, which is

<div id="documents">{if isset($SKIN_SELECT)}{$SKIN_SELECT}{/if} {$SITE_DOCS}</div>

in the main.php file, but I can't seem to figure out how to get it in the white space I created by taking other things out that were un-needed. See, I'm a very graphical person (not really that great with coding) so in my main.php file it's very hard for me to see where I would copy the documents coding because I can't see how it's laid out, graphically. I have tried just adding it to places I think it would go, but it never went in the spot I wanted it too. :-( And on adding the image at the bottom, (the american one), I don't know if I add that to the main.php file, or in a box.something file. Does that make sense? This is MY main.php file for the Mican theme:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="{$TEXT_DIRECTION}" lang="{$HTML_LANG}">
  <head>
	<title>{$META_TITLE}</title>
	<link rel="canonical" href="{$VAL_SELF}" />
	<link rel="shortcut icon" href="{$STORE_URL}/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="{$STORE_URL}/skins/{$SKIN_FOLDER}/styles/common.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="{$STORE_URL}/skins/{$SKIN_FOLDER}/styles/{$SKIN_SUBSET}/layout.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="{$STORE_URL}/js/styles/styles.php" media="screen" />
	{if isset($CSS)}
		{foreach from=$CSS key=css_keys item=css_files}
		  <link rel="stylesheet" type="text/css" href="{$STORE_URL}{$css_files}" media="screen" />
	    {/foreach}
    {/if}
	<!--[if IE 7]><link rel="stylesheet" type="text/css" href="{$STORE_URL}/skins/{$SKIN_FOLDER}/styles/ie7.css" media="screen" /><![endif]-->
	<meta http-equiv="Content-Type" content="text/html;charset={$CHARACTER_SET}" />
	<meta name="description" content="{if isset($META_DESCRIPTION)}{$META_DESCRIPTION}{/if}" />
	<meta name="keywords" content="{if isset($META_KEYWORDS)}{$META_KEYWORDS}{/if}" />
	<meta name="robots" content="index, follow" />
	<meta name="generator" content="cubecart" />
	{if $ANALYTICS}
	{literal}<script type="text/javascript">
	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', '{/literal}{$ANALYTICS}{literal}']);
	  _gaq.push(['_trackPageview']);
	
	  (function() {
	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();
	
	</script>{/literal}
	{/if}
  </head>
<body>
  <div id="page_wrapper">
    <p class="logo"><a href="{$STORE_URL}"><img src="{$STORE_LOGO}" alt="{$META_TITLE}" /></a></p>
	<div id="header">
		<div id="boxes">
   		{$SEARCH_FORM} </div>
	  	<div id="cart_box">
	  		{$SESSION}
	  		{$SHOPPING_CART}
	  </div>
	</div>
	<br clear="all" />
	<div id="main_body">
		<div id="breadcrumb">
		</div>

		<div class="{$SECTION_NAME}_wrapper">
		  <div class="sidebar" id="sidebar_left">
			{$CATEGORIES}
			{$SALE_ITEMS}
			{$MAIL_LIST}
		  </div>
		  <div class="sidebar" id="sidebar_right">
			{if isset($POPULAR_PRODUCTS)}{$POPULAR_PRODUCTS}{/if}
			{$RANDOM_PROD}
		  </div>
		  <div id="page_content">
			{include file='templates/box.errors.php'}
			{if isset($CHECKOUT_PROGRESS)}{$CHECKOUT_PROGRESS}{/if}
			{$PAGE_CONTENT}
			<p style="clear: both; height: 1px;">&nbsp;</p>
		  </div>
	  </div>

	</div>
	<div id="documents">{if isset($SKIN_SELECT)}{$SKIN_SELECT}{/if} {$SITE_DOCS}</div>
  </div>
  
  {if isset($DEBUG_INFO)}{$DEBUG_INFO}{/if}

  {include file='js/common.html'}

  {if isset($JANRAIN)}{$JANRAIN}{/if}

  {if isset($LIVE_HELP)}{$LIVE_HELP}{/if}

  {foreach from=$JS_SCRIPTS key=k item=script}
  <script type="text/javascript" src="{$STORE_URL}/{$script|replace:'':'/'}"></script>
  {/foreach}

  {if $COOKIE_DIALOGUE}
  <form action="{$VAL_SELF}" class="cookies-notify" method="POST">
    <p>{$LANG.notification.cookie_dialogue|replace:'%s':{$CONFIG.store_name}}</p>
    <p>{if $COOKIE_DIALOGUE_FAIL} class="retry"{/if}><input type="checkbox" name="accept_cookies" value="1" /> {$LANG.notification.cookie_dialogue_declaration} <input type="submit" name="accept_cookies_submit" value="{$LANG.common.continue}" /></p>
  </form>
  {/if}
</body>
</html>
Link to comment
Share on other sites

Verify the IP address your ISP has for you. Go to www.whatismyip.com

 

You can also go to admin, Server-Info and scroll to the bottom to find the Remote_Addr.

 

In main.php, where you have this:

<div id="boxes">

{$SEARCH_FORM} </div>

 

Make it look like this:

<div id="boxes">

{$SEARCH_FORM}{$SITE_DOCS} </div>

 

We can then work on "floating" the Site_Doc HTML to the right-hand side of "boxes".

Link to comment
Share on other sites

K, doesn't www.whatismyip.com show the IP of your internet connection, not a website? I'm confused. I know that's the correct IP for that website because I run the server and it's a shared IP, all of my accounts are on a shared IP.

 

Anyways, I did that in main.php and it did add the two links that are in the documents links, but it did it bulleted instead of on one line and isn't separated by the "|" like it is in the bottom one. Which is so weird since it's the same coding. Very strange. We're getting there though. And thank you again for helping me with this! I really do appreciate it!!!

Link to comment
Share on other sites

"show the IP of your internet connection, not a website?"

 

We need the IP address of you so that Smarty's debug will only respond to page requests from you and the debug popup will only display for you.

 

 

"I know that's the correct IP for that website"

 

Don't care what the ip is of the website. CubeCart/Smarty needs to know the page requests are coming from you and no one else.

 

"Anyways, I did that in main.php and it did add the two links that are in the documents links, but it did it bulleted instead of on one line and isn't separated by the "|" like it is in the bottom one. Which is so weird since it's the same coding."

 

That's because the {$SITE_DOCS} at the bottom are inside a div with an id of "documents". The CSS for that div restructures the <ul><li> structure as a free-flowing single line. The box.documents.php file has the <ul> with a class of "documents", but that class could have different CSS than the id.

 

So, it's a matter of getting the CSS sorted. Suggest copying the #documents CSS rule to #documents1, then in main.php, do:

<div id="documents1">{$SITE_DOCS}</div>

 

 

 

 Very strange. We're getting there though. And thank you again for helping me with this! I really do appreciate it!!!

Link to comment
Share on other sites

  • 3 weeks later...

I have a similar issue.  I have Search form and language enabled in this area (not currency).  In place of currency (e.g. the third box) I would like to put social buttons.  I have the code from Addme for these buttons.  How can I enter them.  If I delete {CURRENCY} and add the code for the buttons I get a blank page. I guessed it wouldnt be that simple but thought I would give it a try.

Link to comment
Share on other sites

"I have the code from Addme for these buttons. When I add the code for the buttons I get a blank page."

 

If this code is javascript, then please know that these skin templates use {placeholders} for Smarty, the template engine. Smarty will get confused (and crash) if the use of braces does not conform according to two protocols, only one or the other is necessary:

* Any code that wants to use braces must have white space surrounding those braces (space characters, tabs, line breaks)

* Use {literal} and {/literal} tags to surround the code that wants to use braces.

 

So:

<script>if (true) {do some javascript stuff}</script>

will be a problem. The code, to be ignored by Smarty, would be:

<script>

if (true) {

  do some javascript stuff

}</script>

 

or

 

{literal}<script>if (true) {do some javascript stuff}</script>{/literal}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...