Jump to content

Missing Logo When Customising Skin?


Recommended Posts

Whenever I customise a skin I take one of the original's, change it's name and change everything in the config file to reflect the new name and everything is good except the logo never shows up on the front end.

I know about the logo manager in the back end but I'm not talking about that. The skin is just a copy of the original with a new name so my css changes don't get lost whenever I upgrade so the normal default.png logo is still there but it doesn't show up unless I use the logo manager. Why is this and what can do to resolve it?

I've tried adding a new php file in the /templates/ directory with the same name of the skin with the following code:


<?php header('Location: ../images/logo/default.png', false, 307); ?>

but that doesn't help. What am I missing?

Link to comment
Share on other sites

Looking at Kurouto ( a stock skin) as delivered to the browser, we find this:

<img src="/skin_name/images/logos/my-store-logo.png" />


It comes from this in the template file mail.php:

<img src="{$STORE_LOGO}" />


STORE_LOGO is populated in the file /classes/gui.class.php (depending on the CubeCart version, CC520 vs CC5210) at _setLogo() line 1190 called from __construct(), or at __construct() line 132 which uses _setLogo().


In _setLogo(), the skin name and substyle in use is determined, and a query is made to the CubeCart_config table to fetch the current configuration of the 'logos' record.


When CubeCart through setup, one of the tasks is to pre-load the 'logos' record of the CC_config table with the names of the default logos that ship with the included skins. Some of that record reads as:



etc. Again, this is all figured out during the setup routines.


Now, you add a new skin at some point later. Here is where CubeCart probably falls short: CubeCart will make available the new skin as a matter of course. But, there is no code that must first prepare the skin for use. That is, among other things, I cannot find any code that will automatically prepare CubeCart to use the new skin's default logo. (Maybe that should be a suggestion.)


So, currently, even though the new skin has a default logo, the database has not recorded that fact until the admin (in CC5210 - I don't know how far back) simply -- or so it seems -- visits the Store Settings, Logos tab, and clicks Save without changing anything. When processing the Logos form, a routine is called, rebuildLogos(), that will find and rebuild the current custom (or default if no custom) logos for all the skins it finds and records them in the CC_config table.


I actually think there is more. The new skin is FTP'd to the site. The admin goes to Store Settings, Layout tab. CubeCart (supposedly) inventories all the skins it finds and puts them in the Skin Settings chooser. When the admin selects the new skin and clicks Save, that form and all the other forms on the various tabs get sent to CubeCart for processing, including the Logos form data. And when the Logos form data is processed, rebuildLogos() is called.


So, relative to your experience, are you choosing the new skin from the admin Store Settings, or are you using the skin chooser you have enabled on the storefront?

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.

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.


  • Create New...