Jump to content

Adding new box


Guest saturnnights

Recommended Posts

Guest saturnnights

I'd like to add a new box with links to other pages - similar to what the About Us link at the bottom does. I'd like to have maybe three or four links, including that about us link that's currently at the bottom. I have the "manipulating boxes in cubecart v. 3.0.x" form, but I think that it's not exactly what I'm looking for... Or is it? Does the "adding new boxes containing text and links" refer to links to pages on my own cart/site? Or are these links to outside sites?

Thanks,

Mark

Link to comment
Share on other sites

Guest saturnnights

Unfortunately, that's not explicit enough for me. I don't write php so all I can do is take existing code and mess with it until it works or else I have to quit. In this case, I copied the code verbatim, but changed the part naming my box. Well, it appeared at the bottom center of my page!?!

As for the part where I'm supposed to put my own code, that's another can of worms. I have to go looking for code as I don't speak php.

So you can see, for some of us who use these carts (CC, Zen, etc.), unless the admin controls generate boxes for us, doing so manually is a very difficult thing. You guys can do it in your sleep, but for me, I don't know what the code is telling the cart to do and therefore, can't troubleshoot.

If I had to add my own sale categories to the code, rather than using the admin page, I'd have to abandon all hope of using CC.

Mark

Link to comment
Share on other sites

Hi Mark,

My "Manipulating Boxes" tutorial is a general guide to give a solid introduction to the subject. There is no limit to what you can do with CubeCartâ„¢ code.

If the info there is just too general for you, ask a specific question here and I will answer.

Does the "adding new boxes containing text and links" refer to links to pages on my own cart/site? Or are these links to outside sites?

You can put any kind of link you want in there, whether to outside sites or links within CubeCartâ„¢

Link to comment
Share on other sites

Guest saturnnights

Hi Mark,

My "Manipulating Boxes" tutorial is a general guide to give a solid introduction to the subject. There is no limit to what you can do with CubeCartâ„¢ code.

If the info there is just too general for you, ask a specific question here and I will answer.

You can put any kind of link you want in there, whether to outside sites or links within CubeCartâ„¢

You may be sorry that you volunteered :errm:

Seriously, I just want a new box that has the links from "sitedocs" in it and a couple of extra pages like "How-To" and "News."

I took the "information" box and tried editing it to show a link - basically took the piece of code from Categories that takes you home - put that in there and all I have is the "information" box showing with nothing at all in the box.

My basic problem is that I don't understand how the boxes call data to fill them. The code isn't intuitive to a newbie, even one with a lot of HTML experience. Heck, I'm a network admin with some certifications under my belt, but I consider this to be a totally foreign language. I had a programmer friend who used to try to convince me that programming was easy if you were already an IT pro... I used to laugh at him... Still do... :errm:

Anyway, I think that modifying the information box wasn't a good idea. I tried following the instructions to make a new box, but that was equally fruitless. I need a cookbook-style recipe for doing this with nothing assumed or left out :blink:

Mark

Link to comment
Share on other sites

What you're asking is easily done - but which skin are you using?

There are a couple of things in the pinned post, "PLEASE READ THIS BEFORE POSTING," that you should bear n mind: Tell us which skin a CC version you are using, and give us a link to the site.

Basically, you need to format styleTemplates/boxes/siteDocs.tpl to display its data in a list rather than a row of items separated by |, and enclose it with a box and box title.

REPLACE ALL the contents of siteDocs.tpl with this code for Legend/Classic:

<!-- BEGIN: site_docs -->

<div class="boxTitleLeft">Site Navigation</div>

<div class="boxContentLeft">

	<ul>

		<!-- BEGIN: a -->

		<li class="bullet"><a href="index.php?act=viewDoc&amp;docId={DATA.doc_id}" class="txtDefault">{DATA.doc_name}</a></li>

		<!-- END: a -->

	</ul>

</div>

<!-- END: site_docs -->




REPLACE ALL the contents of siteDocs.tpl with this code for Killer:




<!-- BEGIN: site_docs -->

<div class="boxTitleLeft">Site Navigation</div>

<div class="boxContentLeft">

	<ul>

		<!-- BEGIN: a -->

		<li class="bullet"><a href="index.php?act=viewDoc&amp;docId={DATA.doc_id}" class="txtDefault">{DATA.doc_name}</a></li>

		<!-- END: a -->

	</ul>

</div>

<div class="boxFootLeft">&nbsp;</div>

<!-- END: site_docs -->

Link to comment
Share on other sites

Guest saturnnights

What you're asking is easily done - but which skin are you using?

There are a couple of things in the pinned post, "PLEASE READ THIS BEFORE POSTING," that you should bear n mind: Tell us which skin a CC version you are using, and give us a link to the site.

Basically, you need to format styleTemplates/boxes/siteDocs.tpl to display its data in a list rather than a row of items separated by |, and enclose it with a box and box title.

REPLACE ALL the contents of siteDocs.tpl with this code for Legend/Classic:

<!-- BEGIN: site_docs -->

<div class="boxTitleLeft">Site Navigation</div>

<div class="boxContentLeft">

	<ul>

		<!-- BEGIN: a -->

		<li class="bullet"><a href="index.php?act=viewCat&amp;catId={DATA.doc_id}" class="txtDefault">{DATA.doc_name}</a></li>

		<!-- END: a -->

	</ul>

</div>

<!-- END: site_docs -->




REPLACE ALL the contents of siteDocs.tpl with this code for Killer:




<!-- BEGIN: site_docs -->

<div class="boxTitleLeft">Site Navigation</div>

<div class="boxContentLeft">

	<ul>

		<!-- BEGIN: a -->

		<li class="bullet"><a href="index.php?act=viewCat&amp;catId={DATA.doc_id}" class="txtDefault">{DATA.doc_name}</a></li>

		<!-- END: a -->

	</ul>

</div>

<div class="boxFootLeft">&nbsp;</div>

<!-- END: site_docs -->

Thanks for the help - you've got me going in the right direction now. Sorry about the lack of info when I first posted...

Okay, I'm using a modified version of the Classic skin. My CC is version 3.0.10. Here's the site I'm configuring: www.enamelanimal.net

You can see that I've taken your code and inserted/changed it and not the sitedocs are at the left rather than the bottom (site Navigation) - can I change that title without much ado?

Okay, now that the box has been moved, the one last thing is that its links are showing the contents of the links in the preceeding box (categories - named product catalog). They no longer link to the site docs. How can I fix that?

Thanks again for your help - and patience!

Mark

Link to comment
Share on other sites

Well crud!

Obviously I didn't completely fix the links in my code :blink:

OK, I have edited my first post now, with what should be the correct code.

You can change the part that says "Site Navigation" to whatever you want it to say. Just replace my original code with the new improved code above in my original code posting. :errm:

Link to comment
Share on other sites

Guest saturnnights

Well crud!

Obviously I didn't completely fix the links in my code :blink:

OK, I have edited my first post now, with what should be the correct code.

You can change the part that says "Site Navigation" to whatever you want it to say. Just replace my original code with the new improved code above in my original code posting. :errm:

LOL - makes me feel a little better now whenever I insert a typo! :errm:

Okay, I've changed the code to your new version of Classic and nothing happened - same problem of displaying the catalog links from the box right above it. Is that box the only thing I had to modify to move the links from the bottom of the page to a box at the left? Or am I missing something?

Thanks!

Mark

Link to comment
Share on other sites

No, the code should be correct now - but only in MY post, not your QUOTE of my post. You must have copied the errant code again from your QUOTE of my original post.

If I had moderator privileges, I'd edit your QUOTE up there, because it still contains incorrect code. It would be great if you could edit your post above and delete the quoted section :blink:

Please try the new code again, being careful to copy it from the correct place. I want to know for sure if it works as advertised :errm:

Link to comment
Share on other sites

Guest saturnnights

It would sure help if my brain was working today... :blink:

Yes!! Your code works just fine - sorry 'bout that confusion!

Thanks a ton!

Mark

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.

×
×
  • Create New...