Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 07, 2012, 11:19:56 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
The E-commerce forum, the best place for advice for your Small Business.
12248
Posts in
1446
Topics by
5606
Members
Latest Member:
artifiamb
E-commerce forum
E-commerce
Shopping cart software
Prestashop
Links in category
« previous
next »
Pages:
[
1
]
2
Author
Topic: Links in category (Read 1525 times)
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Links in category
«
on:
March 03, 2010, 02:38:25 PM »
I've got this working on my old site, but cant for the life of me get it work on my new one!
I have a few main categories with many subcategories off them.
If a category is selected I want the subcategories to show on the page as links (dont need images) but cant remember how I did it before or what to edit!
ie I want the page to show as :
Games (category selected)
Board Video Childrens Adult (subcategories available)
Hope that makes sense!
As always any help and/or comments appreciated
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
JhnStcks
Global Moderator
Part of the Furniture
Karma: 12
Offline
Gender:
Posts: 406
Re: Links in category
«
Reply #1 on:
March 03, 2010, 04:57:10 PM »
Basically you dont want the ? to show because you have no image?
Logged
Snowboarding Goggles
For all things Snowboarding and Skiing. Goggles, Helmets, Gloves and Clothing.
The Fashion Agent
We are your fashion agent. Designer Clothes, sunglasses, headphones from top designer brands.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #2 on:
March 03, 2010, 05:33:32 PM »
No, for some reason I have a completely blank page!
Think the customised theme I am using has had some code removed from whichever file its using so I need to know firstly, which file it is (may be able to rebuild it by comparing it to my old site) and secondly what code is needed to show the subcategory links
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
JhnStcks
Global Moderator
Part of the Furniture
Karma: 12
Offline
Gender:
Posts: 406
Re: Links in category
«
Reply #3 on:
March 03, 2010, 05:38:30 PM »
The categories pages are controlled using categories.tpl file in your theme folder.
If you backup the file from your theme you could try just copying over the same file from the prestashop default theme.
Logged
Snowboarding Goggles
For all things Snowboarding and Skiing. Goggles, Helmets, Gloves and Clothing.
The Fashion Agent
We are your fashion agent. Designer Clothes, sunglasses, headphones from top designer brands.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #4 on:
March 03, 2010, 05:41:51 PM »
Thanks Jhn
Hopefully it will be the easy
I'll give that a go once the kids have gone to bed later!
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #5 on:
March 04, 2010, 11:58:23 AM »
That seems to have almost cured it, but now I have another annoying problem!
The first two subcategories and images now appear on the category page about half way above the rest
So I see the page as:
subcat1 subcat2
image 1 image 2 subcat3 subcat4
Image 3 image4
I thought to start with it might be the way the ul_inline is set in category.tpl but comparing it to my old site (and the relevant css element for it) they are the same
Could it be the images that are causing the misalignment?
Ive tried deleting the 1st 2 subcategories but still have the same result, just the next 2 are raised
If you wouldnt mind having a look, here's the category.tpl code
Code:
{include file=$tpl_dir./breadcrumb.tpl}
{include file=$tpl_dir./errors.tpl}
{if $category->active}
<h2 class="category_title">
{$category->name|escape:'htmlall':'UTF-8'}
<span>{if $nb_products>0}{$nb_products|intval} {if $nb_products>1}{l s=‘products’}{else}{l s=‘product’}{/if}{/if}</span>
</h2>
{if $scenes}
<!-- Scenes -->
{include file=$tpl_dir./scenes.tpl scenes=$scenes}
{else}
<!-- Category image -->
{/if}
{if $category->description}
<div class="cat_desc">{$category->description}</div>
{/if}
{if isset($subcategories)}
<!-- Subcategories -->
<div id="subcategories">
<h3>{l s=''}</h3>
<ul class="inline_list">
{foreach from=$subcategories item=subcategory}
<li>
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
<img src="{$img_cat_dir}{if $subcategory.id_image}{$subcategory.id_image}{else}default{/if}-medium.jpg" alt="" />
</a>
<br />
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
</li>
{/foreach}
</ul>
<br class="clear"/>
</div>
{/if}
{if $products}
{include file=$tpl_dir./product-sort.tpl}
{include file=$tpl_dir./product-list.tpl products=$products}
{include file=$tpl_dir./pagination.tpl}
{elseif !isset($subcategories)}
<p class="warning">{l s='There is no product in this category.'}</p>
{/if}
{else}
<p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
Thanks again for your help
Martin
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
JhnStcks
Global Moderator
Part of the Furniture
Karma: 12
Offline
Gender:
Posts: 406
Re: Links in category
«
Reply #6 on:
March 04, 2010, 12:37:24 PM »
The only difference between your file and mine is the way the category images are being called, apart from the code you have removed to get rid of the missing image, image.
Line 31 of yours reads
Code:
<img src="{$img_cat_dir}{if $subcategory.id_image}{$subcategory.id_image}{else}default{/if}-medium.jpg" alt="" />
and mine is
Code:
<img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" />
Logged
Snowboarding Goggles
For all things Snowboarding and Skiing. Goggles, Helmets, Gloves and Clothing.
The Fashion Agent
We are your fashion agent. Designer Clothes, sunglasses, headphones from top designer brands.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #7 on:
March 04, 2010, 01:21:50 PM »
Changing my code to yours doesnt seem to make any difference, so I guess its something in the way the images are shown or in the css itself
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
JhnStcks
Global Moderator
Part of the Furniture
Karma: 12
Offline
Gender:
Posts: 406
Re: Links in category
«
Reply #8 on:
March 04, 2010, 01:49:16 PM »
Why dont you remove the entire images code if you dont want images, that could be causing the problem
Logged
Snowboarding Goggles
For all things Snowboarding and Skiing. Goggles, Helmets, Gloves and Clothing.
The Fashion Agent
We are your fashion agent. Designer Clothes, sunglasses, headphones from top designer brands.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #9 on:
March 07, 2010, 01:12:30 PM »
Its taken all this morning but with lots of the 'trial and error' method I've finally fixed it
It was in global.css
I changed:
Code:
/* simple list inline */
ul.inline_list{ list-style-type:none; margin-top: 1em; }
ul.inline_list li { float:left; text-align:center; }
ul.inline_list li img{ display:block; }
ul.half {
width: 45%;
margin-right: 1em;
float: left;
}
to:
Code:
/* simple list inline */
ul.inline_list{ list-style-type:none; margin-top: 12em; }
ul.inline_list li { float:left; text-align:center; }
ul.inline_list li img{ display:block; }
ul.half {
width: 45%;
margin-right: 1em;
float: left;
}
and everything looks fine now
I guess the margin wasnt big enough before
Thanks for your help
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #10 on:
March 10, 2010, 09:45:55 PM »
Sorted that out and now have another 'feature' thats stumping me
As you can see in the pic below, on the subcategory page the description appears above the SC name
Cant for the life of me work out how to reverse them
I know its probably staring me straight in the face but I cant see it
Could also do with moving the product sort dropdown higher up the page..
sibcat.jpg
(38.15 KB, 911x404 - viewed 51 times.)
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
JhnStcks
Global Moderator
Part of the Furniture
Karma: 12
Offline
Gender:
Posts: 406
Re: Links in category
«
Reply #11 on:
March 11, 2010, 07:46:42 AM »
Could you post your categories.tpl file please
Logged
Snowboarding Goggles
For all things Snowboarding and Skiing. Goggles, Helmets, Gloves and Clothing.
The Fashion Agent
We are your fashion agent. Designer Clothes, sunglasses, headphones from top designer brands.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #12 on:
March 11, 2010, 09:57:31 AM »
This is what I have
Code:
{include file=$tpl_dir./breadcrumb.tpl}
{include file=$tpl_dir./errors.tpl}
{if $category->active}
{if $scenes}
<!-- Scenes -->
{include file=$tpl_dir./scenes.tpl scenes=$scenes}
{else}
<!-- Category image -->
{/if}
{if $category->description}
<div class="cat_desc">{$category->description}</div>
{/if}
{if isset($subcategories)}
<!-- Subcategories -->
<div id="subcategories">
<h3>{l s=''}</h3>
<ul class="inline_list">
{foreach from=$subcategories item=subcategory}
<li>
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
<img src="{$img_cat_dir}{if $subcategory.id_image}{$subcategory.id_image}{else}default{/if}-medium.jpg" alt="" />
</a>
<br />
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
</li>
{/foreach}
</ul>
<br class="clear"/>
</div>
{/if}
{if $products}
{include file=$tpl_dir./product-list.tpl products=$products}
{include file=$tpl_dir./pagination.tpl}
{elseif !isset($subcategories)}
<p class="warning">{l s='There is no product in this category.'}</p>
{/if}
{else}
<p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
JhnStcks
Global Moderator
Part of the Furniture
Karma: 12
Offline
Gender:
Posts: 406
Re: Links in category
«
Reply #13 on:
March 12, 2010, 11:26:56 AM »
Fivewood how have you managed to get the category title underneath the category description?
The category.tpl file you posted above doesnt fit with the image you posted eariler, you removed the product-sort includes code out.
«
Last Edit: March 12, 2010, 11:33:14 AM by JhnStcks
»
Logged
Snowboarding Goggles
For all things Snowboarding and Skiing. Goggles, Helmets, Gloves and Clothing.
The Fashion Agent
We are your fashion agent. Designer Clothes, sunglasses, headphones from top designer brands.
fivewood
Liking it Here
Karma: 6
Offline
Gender:
Posts: 102
Re: Links in category
«
Reply #14 on:
March 12, 2010, 11:44:46 AM »
Thats what I cant work out !
If I add the product sort code back in, it appears on the page twice...
Logged
http://www.footballbits.co.uk
- huge selection of officially licenced football souvenirs, merchandise, memorabilia and gifts. Perfect for fans of all ages and at affordable prices.
Pages:
[
1
]
2
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Small Business Network
-----------------------------
=> General Network Stuff .....
-----------------------------
E-commerce
-----------------------------
=> Dropship discussion
=> Dropship suppliers
=> Wholesale discussion
=> Wholesale suppliers
=> Products discussion
=> Website development
=> Shopping cart software
===> Zen cart
===> Prestashop
===> Cubecart
===> Open Cart
===> Magento
===> OsCommerce / Creload
===> Other cart software
=> SEO and marketing
=> Payment and shipping
=> Ebay and auction sites
=> Business start ups
=> Accounts and book keeping
=> General business discussions
=> Services offered
=> Services requested
-----------------------------
Social Networking
-----------------------------
=> Facebook
===> Wordpress
===> Drupal
===> DotNetNuke
===> Joomla
===> Blogger
-----------------------------
General Category
-----------------------------
=> Introductions
=> General Discussion
=> The Lounge
===> The Bar
===> Recipes
Loading...
SimplePortal 2.2.2 © 2008-2009