X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Pure CSS Rounded Boxes! (no images, no tables) (https://forum.x-cart.com/showthread.php?t=33828)

JWait 01-12-2009 02:43 PM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
To clear the templates cache, enter http://www.your site.com/cleanup.php in your browser.

"The extra dialogue menu I added is where it was"
There shouldn't be an "extra", the dialog.tpl in this mod replaces the original one. The same with menu.tpl. You can do this by naming the files "dialog.tpl-new" and "menu.tpl.new" and then uploading them via ftp. Then rename the existing dialog.tpl to dialog.tpl-old and rename dialog.tpl-new to dialog.tpl. This makes it easy to reverse if needed.
Enter http://www.your site.com/cleanup.php in your browser, and then go check your site.

Is your on sale mod in one of the menus, or in the center section? Depending on where it is, try working one the area where it isn't first. Does the on sale mod have a template (.tpl)? If so can you post it here?

iWD 01-14-2009 05:36 AM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
By "extra dialogue menu" I mean a menu effected by the dialogue.tpl and not the menu.tpl.
I have added an extra "window" (I'm not sure how the terminology works.)
This is suppose to be an "ad-like" equivlient, though I can't get it to be just an image, but that's a problem for another thread.

Let me make it clear, I do not have two copies of the dialog.tpl or menu.tpl (well not on the server anyway) in the way you are describing (as that would not work well at all).

I am replacing them with a new file (with the changes).
When it breaks I then replace it with the old file (original).
And so the cycle continues.

So, that is not the problem I'm incurring, and the cleanup.php didn't seem to have any effect of the site design wise (though is nice to know how to use -- thanks!).

There doesn't appear to be any template (.tpl) files for the the "On Sale" mod (would it hide somewhere other then where the menu.tpl and dialog.tpl are?) There is only a php file, which I will not be touching if I can avoid it, as I am still only learning and will not break it, as it does its job very nicely!

The "On Sale" does appear as a link in the "products" menu on the left (in it's right hand corner) and as an "ad-like banner" in the center of the page.

I'm fine with that, though I've seen it on other pages and the link is the same as all the other product categories, if that is something I've done and therefore is what is causing the issue then anyone know how to fix that?

I can not change the dialog.tpl or the menu.tpl will effect one or both of these sections.
The menu.tpl will effect the "product" menu and it goes messy or the dialog.tpl effects the "featured products" and "my new ad window" this then causes issues.

I have this same "ad window" on all the other sites, same code, different coloured type.

Any Thoughts?

JWait 01-14-2009 06:22 AM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
The menu.tpl controls the "boxes" in the left and right hand columns.
The dialog.tpl controls the "boxes" in the center column.

Have you tried using Webmaster mode to determine what template controls the "on sale" mod?

Can you send me a link (private message) to the site where you are having the problems?

iWD 01-14-2009 09:51 AM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
I understand that the menu.tpl controls the "boxes" on the left and right column.
I understand that the dialog.tpl controls the "boxes" in the center column.
But, the dialog.tpl also controls my menu from the mod thread Adding HTML Boxes on Main Page where I added it on the right column. Again this is the same as the other sites, where I have rounded the corners.

Through webmaster mode I don't appear to get anymore details except that it is controlled by "onsale.php".

thanks

JWait 01-15-2009 03:14 AM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
One of the problem is that the first "box" in your right column is using "DialogTitle", "DialogBorder" and "DialogBox" classes instead the normal "VertMenuTitle", "VertMenuBorder" . and "VertMenuBox". This is probably because dialog.tpl is being called from the template for that "box" instead of menu.tpl. This is evidenced by the rounded upper left hand corner and green outline instead of black, the same as your "dialog" boxes (like "featured products" has on your main page).

From the thread you referenced about "Adding HTML Boxes on Main Page", it calls the template "mycustombox.tpl", so it would be that or whatever you named it (onsale.tpl?) that controls that box. It needs to have menu.tpl instead of dialog.tpl control that space.

iWD 01-15-2009 05:40 AM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
I have tried using the menu.tpl settings on "my custom box" and when moving over the rounded corners menu.tpl the same problem occurred.
All the menus on the left were stretched across the page and so on.
It almost feels like an open tag, missing a close tag?
That's very HTML, but that's all I can compare it to.

On the other two sites that I am using the rounded corners on I am using the dialog.tpl for the box and the rounded corners works just fine? You just have to change the dialog.tpl file too.
Since I want a different look and feel for that window (so it jumps out) I would like to able to keep it as the same as the "feature products" window. I know right now they are very much the same, but I am looking at changing them, if I can get this to work.

I'm fairly certain that the "on sale" mod from altered carts, is what is making this rounded corners mod not work as it is the biggest difference, perhaps the only difference.

However, after searching around some more I finally found the .tpl files
There are 11 files, with lots of code.
They appear more to be the admin side and the middle window.
The part that makes the sales and the part where the sales themselves are displayed.
This is not where the issue appears to be occurring.

I fairly certain the problem is with where the setting on the "sales & promotions" link is in the "products" window.
I went through the language feature and found the title of the "sales & promotions" link in the "product" window, but that is not in any of the tpl files?
Therefore I can't move it where it is suppose to go. Perhaps that line of code is missing?
The close tag so to speak?
I didn't change the code, I only used it and added sales, so it would have to be something that happen in installation or something else I might have done in the CSS/Design that effected.

In the demo version on the altered carts site, their link in that menu is the same as all the other categories. Maybe this is what is causing it?
But, the mod works fine otherwise?

Any thoughts?
Thanks!

iWD 01-19-2009 11:15 AM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
In case anyone is wondering how this turned out.
This has now been resolved!

There were some issues in the "On Sale" code placed in the categories.tpl
So if you have the same issue, the problem probably lies in there.

Thanks a million from JWait

rawle@websonet.com 01-29-2009 06:54 PM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
rounded boxes is nice. How do i accomplish this in x-cart 4.2?

JWait 01-29-2009 08:17 PM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
Quote:

Originally Posted by rawle@websonet.com
rounded boxes is nice. How do i accomplish this in x-cart 4.2?


4.2 is kind of tricky, but I am working on it. But it is not easy, and the code below doesn't make it work. Read under the code posted for an explanation.

Here is what I have so far....

skin1/customer/menu_dialog.tpl (for the menu boxes)
Code:

{*
$Id: menu_dialog.tpl,v 1.4 2008/11/24 09:23:19 max Exp $
vim: set ts=2 sw=2 sts=2 et:
 Mods - replaced entire contents to make rounded boxes *}
<div class="xrounded{if $additional_class} {$additional_class}{/if}">
<b class="xtop">
<b class="xb1"></b>
<b class="xb2 color_a"></b>
<b class="xb3 color_a"></b>
<b class="xb4 color_a"></b>
</b>
<div class="xboxcontent{if $additional_class} {$additional_class}{/if}">
<h1 class="color_a" align="center">{if $link_href}<a href="{$link_href}">{/if}{$title|escape}{if $link_href}</a>{/if}</h1>
<div class="content{if $additional_class} {$additional_class}{/if}">{$content}</div>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b>
<b class="xb2"></b><b class="xb1"></b></b>
</div>


skin1/customer/dialog.tpl (for the center boxes)
Code:

{*
$Id: dialog.tpl,v 1.8 2008/11/26 06:31:47 cray Exp $
vim: set ts=2 sw=2 sts=2 et:
 Mods - replaced entire contents to make rounded boxes *}
{if $printable ne ''}
{include file="dialog_printable.tpl"}
{else}
<div class="xrounded{if $additional_class} {$additional_class}{/if}">
<b class="xtop">
<b class="xb1"></b>
<b class="xb2 color_a"></b>
<b class="xb3 color_a"></b>
<b class="xb4 color_a"></b>
</b>
<div class="xboxcontent{if $additional_class} {$additional_class}{/if}">
<h1 class="color_a{if $printable ne 'Y'} title-with-sort-row{/if}">{$title}</h1>

<div class="dialog-search-sort-bar">
        {if $selected eq '' && $direction eq ''}
        {include file="customer/search_sort_by.tpl" selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url=$products_sort_url}
        {else}
        {include file="customer/search_sort_by.tpl" url=$products_sort_url}
        {/if}
      </div>
<div class="content{if $additional_class} {$additional_class}{/if}">{$content}</div>


</div>
<b class="xbottom">
<b class="xb4"></b>
<b class="xb3"></b>
<b class="xb2"></b>
<b class="xb1"></b>
</b>
</div>
{/if}


There are several templates that use "lists" to get the items to display. I know that categories.tpl, and help.tpl have them, and manufacturers.tpl probably does also. Anyway, I had to "convert" the <ul>s and <li>s to use simple <br /> tags to get the boxes to close and display correctly. It "works" but I'm not happy with it.

You also have to add the classes posted earlier (post #82) in this thread to your main.css stylesheet. Post #94 deals with a problem in IE that I can't seem to replicate, so you might check there if you run into a problem.

pfarcus 02-10-2009 05:13 PM

Re: Pure CSS Rounded Boxes! (no images, no tables)
 
1 Attachment(s)
I love this too but I'm having the same stretching problem as iWD, only in the admin side. Everything else is great, just the left boxes stretch waaay out.

I bet this is an easy fix but I can't figure out how. (see pic)

thanks


All times are GMT -8. The time now is 10:47 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.