Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest

Category links

Recommended Posts

Guest sparrowdog

Thanks for that. It will help me quite a lot. An excellent mod indeed.

Share this post


Link to post
Share on other sites

Guest wendym

Me -> :) doh!! *slaps head*

My apologies.

All you need to do:-

  • in the file functions.inc.php (in the 'includes' dircectory) go to the 'Get Category Directory' section
  • find the following line : $dirArray[0] = $config['dirSymbol'].$catName
  • and change it something similar to this : $dirArray[0] = $config['dirSymbol']." <a href='".$GLOBALS['rootRel']."index.php?ccUser=".$sessId."&amp;catId=".$catId."&amp;act=viewCat' class='txtLocation'>".$catName."</a> ";

Doing that got the desired affect, that I was after.

I'll get back to you on having a link to the homepage, as *the* top-level link, as I havent sorted this yet.

But it should be easy enough, just by adding an a suitable value in the $lang['front']['viewCat'] and $lang['front']['viewProd'] arrays (may be able to get by with just adding a new array to hold the link - probably a better idea) in language/en/lang.in.php

Then in both viewCat.inc.php and viewProd.inc.php adding a line similar to:

$view_cat->assign("TXT_LINK_HOME",array_identifier);

After which it should just be a case of edting the viewCat.tpl and viewProd.tpl files (in skins/your-skin/styleTemplates/content/) to show the link.

Can you tell me how to do this in version 3.08?

Thanks

Share this post


Link to post
Share on other sites
Guest

As far as I'm aware (have tried it succussfully with 3.08) the process should be exactly the same as I have posted in this thread.

Share this post


Link to post
Share on other sites
Guest wendym

Thanks, I should have opened my eyes wider, I couldn't see the line of code you were talking about. Just had a look again, found the code and made the changes and it works. Thanks again.

Share this post


Link to post
Share on other sites
Guest

Thanks, I should have opened my eyes wider, I couldn't see the line of code you were talking about. Just had a look again, found the code and made the changes and it works. Thanks again.

No problem :)

I think it could be worthwhile me uploading this as a mod to CubeCart.org, especially given the interest it has generated.

I'll get it done for the end of the day.

(The Breadcrumb Navigation stuff that is. Theres about 3 or 4 different things on here lol!)

Share this post


Link to post
Share on other sites
Guest alienbob

Nice mods, thanks :o

Just wondered how you get the breadcrumb at the top of the centre column as you have on your Freetime site instead of on the bottom as on mine!?

Cheers

Ab

Share this post


Link to post
Share on other sites
Guest luvs2ride1979

Woo Hoo! You're the man webpresentations... Worked great and I didn't even screw it up! lol I'm going to copy and paste all of those instructions and keep them in my ever-growing cube cart modifications folder :w00t:.

Share this post


Link to post
Share on other sites
Guest katherinedenger

Well, I gave up on this problem for awhile, but now i have to go back to it... :)

I have posted about this before but have never found the solution. After finding this thread, i had renewed hope, but after checking functions.inc.php, I found the code seems to be correct already. I am using ver 3.0.9 (with SEO mod and several others); the address is www.promolifestore.com.

The problem is when I click on my breadcrumbs, rather than going to the category on my page, it goes to www.categoryname instead.

I have also read all I can find on making sure i have the root rel entered correctly and it seems that it is.

$glob['rootDir'] = '/var/www/html/promolifestore.com/html/www';

$glob['rootRel'] = '/';

$glob['storeURL'] = 'http://www.promolifestore.com';

?>



here is the relevent code in functions.inc.php:


/* <rf> search engine friendly mods */	

		if($config['sef'] == 0) {		

			$dirArray[0] = $config['dirSymbol']."<a href='".$GLOBALS['rootRel']."index.php?ccUser=".$sessId."&catId=".$catId."&act=viewCat' class='txtLocation'>".$catName."</a>";

		} else {			

			$dirArray[0] = $config['dirSymbol']."<a href='".$GLOBALS['rootRel']."index.php?act=viewCat&catId=".$catId."' class='txtLocation'>".$catName."</a>";			

		}

		/* <rf> end mod */

	} else {			

		if ($link == TRUE && $last_link == TRUE) {



			$dirArray[0] = $config['dirSymbol']."<a href='".$GLOBALS['rootRel']."index.php?ccUser=".$sessId."&catId=".$catId."&act=viewCat' class='txtLocation'>".$catName."</a> ";

		

		} else {

		

			$dirArray[0] = $config['dirSymbol'].$catName;

		}

If anyone can help me i'll be extremely grateful. I know it must be something simple i've overlooked but I just can't figure it out. I'd hate to have to take the breadcrumbs out all together. I think they are a very important navigational tool.

Share this post


Link to post
Share on other sites
Guest tars21

Thanks, I should have opened my eyes wider, I couldn't see the line of code you were talking about. Just had a look again, found the code and made the changes and it works. Thanks again.

No problem ;)

I think it could be worthwhile me uploading this as a mod to CubeCart.org, especially given the interest it has generated.

I'll get it done for the end of the day.

(The Breadcrumb Navigation stuff that is. Theres about 3 or 4 different things on here lol!)

Is this mod up? And if so, where is it please?

When I do a "breadcrumb" search I only get one result (and strangely, this thread is not the one listed!)

Thanks for the help!

Share this post


Link to post
Share on other sites
Guest idara

Hi WebPresentations

Nice mod for Category links,

at my site the Category links/subcat are shown below the categories, I want them to be at the top, how can i do it please. for example below is the image.

storehome.jpg

Kind Regards

Yunus

Share this post


Link to post
Share on other sites
Guest badges

Is this mod up? And if so, where is it please?

When I do a "breadcrumb" search I only get one result (and strangely, this thread is not the one listed!)

Thanks for the help!

Interested in this too. Have searched dot org with no luck.

Alternatively, perhaps someone can anyone confirm that the instructions in this thread work for version 3.0.15?

Thanks.

Share this post


Link to post
Share on other sites
Guest

Hello, I'm sorry to drag up this old thread but I have an issue that is related.

I am using the style "classic" and have implemented the mods for both the homepage link and the current sub catagory link succesfully for my viewprod page and the viewcat page when there are products to see however no matter what I try I can't get them to show up on the subcat pages which have no products.

missingstuff.jpg

You can see that the viewcat page with the products on has the link at the top but the viewcat page without any products on is missing the links at the top, it's highlited subtley in red by the way :rolleyes:

Here's my code for the viewcat page

<!-- BEGIN: view_cat -->

<div class="boxContentMid">

	<div class="boxTitleMid"><span class="txtContentTitle">{TXT_CAT_TITLE}</span></div>

	<br />

	<div class="txtDefault"><a href="index.php" class="txtDefault">{TXT_LINK_HOME}</a> {CURRENT_DIR}</div>

	<br clear="all" />

	<!-- BEGIN: sub_cats -->

	<div id="subCats">

		<!-- BEGIN: sub_cats_loop -->

		<div class="subCat">

			<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" title="{TXT_CATEGORY}" /></a><br />

			<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS})

		</div>

		<!-- END: sub_cats_loop -->

	</div>

	<!-- END: sub_cats -->

	<br clear="left" />

	<!-- BEGIN: cat_img -->

	<img src="{IMG_CURENT_CATEGORY}" alt="{TXT_CURENT_CATEGORY}" border="0" title="{TXT_CURENT_CATEGORY}" />

	<!-- END: cat_img -->

	<div class="pagination">{PAGINATION}</div>

<div id="sortform">

<script language="JavaScript">

function goto(form) { var index=form.select.selectedIndex

if (form.select.options[index].value != "0")

	 {

location=form.select.options[index].value;

	}

}

</SCRIPT>

 <form name="sortcat" >

Sort by: <select name="select" onchange="goto(this.form)">

<option value="" >Choose a sorting method</option>

<option value="{CURRENT_URL}&order=popularity">Popular Products</option>

<option value="{CURRENT_URL}&order=az">Filter: A-Z</option>

<option value="{CURRENT_URL}&order=za">Filter: Z-A</option>

<option value="{CURRENT_URL}&order=newest" >Newest Products First</option>

<option value="{CURRENT_URL}&order=oldest">Oldest Products tFirst</option>

<option value="{CURRENT_URL}&order=lowhigh">Price: Lowest First</option>

<option value="{CURRENT_URL}&order=highlow">Price: Highest First</option>

</select></form>

</div>

<br/> 





<!-- BEGIN: productTable -->

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="tblList">

  <tr>

	<td class="tdListTitle"><strong>{LANG_IMAGE}</strong></td>

	<td class="tdListTitle"><strong>{LANG_DESC}</strong></td>

	<td class="tdListTitle"><strong>{LANG_PRICE}</strong></td>

	<td class="tdListTitle">&nbsp;</td>

  </tr>

  <!-- BEGIN: products -->

  <tr>

	<td align="center" class="{CLASS}"><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self"><img src="{SRC_PROD_THUMB}" alt="{TXT_TITLE}" border="0" title="{TXT_TITLE}" /></a></td>

I simply cannot see why the links are visible on the page with products and not on the page without them :rolleyes:

Share this post


Link to post
Share on other sites
Guest Vibegaz

Me -> :yeahhh: doh!! *slaps head*

My apologies.

All you need to do:-

  • in the file functions.inc.php (in the 'includes' dircectory) go to the 'Get Category Directory' section
  • find the following line : $dirArray[0] = $config['dirSymbol'].$catName
  • and change it something similar to this : $dirArray[0] = $config['dirSymbol']." <a href='".$GLOBALS['rootRel']."index.php?ccUser=".$sessId."&amp;catId=".$catId."&amp;act=viewCat' class='txtLocation'>".$catName."</a> ";

Doing that got the desired affect, that I was after.

I'll get back to you on having a link to the homepage, as *the* top-level link, as I havent sorted this yet.

But it should be easy enough, just by adding an a suitable value in the $lang['front']['viewCat'] and $lang['front']['viewProd'] arrays (may be able to get by with just adding a new array to hold the link - probably a better idea) in language/en/lang.in.php

Then in both viewCat.inc.php and viewProd.inc.php adding a line similar to:

$view_cat->assign("TXT_LINK_HOME",array_identifier);

After which it should just be a case of edting the viewCat.tpl and viewProd.tpl files (in skins/your-skin/styleTemplates/content/) to show the link.

Can you tell me how to do this in version 3.08?

Thanks

I really need to do have the sub cat link in v 3.0.18, but unfortunately the code is different.

Can anybody help me?

Share this post


Link to post
Share on other sites
Guest mike

Right,

To sort the problem of no breadcrumb navigation showing on categories which have no product ....

in viewCat.inc.php look for the 'repeated region' section

look for the following statement

} elseif(isset($_GET['searchStr'])) {



there should be 'else' statement nearby



insert the following code, after the closing brace }




$view_cat->assign("TXT_LINK_HOME",$lang['front']['showLinks']['home']);

	$view_cat->assign("CURRENT_DIR",getCatDir($currentCat[0]['cat_name'],$currentCat[0]['cat_father_id'], $currentCat[0]['cat_id'], $link=TRUE));



this should be sitting above the 'no products' code, i.e.




$view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['no_prods_in_cat']);

	$view_cat->parse("view_cat.noProducts");

I just now need to sort something similar for a search results page (viewCat.inc.php again).

Anyway hope this helps for now. I'm off to try and wrap my head around how to have a copy of the shopping cart box on a brochure site linked to a Cube Cart store. Having nightmarish problems with sessions. (Mainly because the brochure site is content managed with its own session, and the shopping cart box needs a session so that it will correctly display the basket contents.) :yeahhh:

I am borrowing the thread a little.

The breadcrumb links works fine but I get them under the category title and picture of the folder. How do I make the line to show above? Just like I see in the product page?

Share this post


Link to post
Share on other sites
Guest LeonardsExtra

Thanks for original post. Works great

Done exactly as told, does exactly as described.

Cheers

Share this post


Link to post
Share on other sites

×
×
  • Create New...