Jump to content

Limiting the number of viewable items in cart on index TPL pages


Guest slshimerdla

Recommended Posts

Guest slshimerdla

Does anyone know if there is a way to limit the number of items that show up inside the Shopping Bag (Cart) on the index.tpl pages? I have a limited amount of space that this cart can take up, in the way that my site is set up, and I don't want it running down outside of the space allotted to that DIV or disappearing altogether.

So, I'd like it to show, say,... the first 5 cart items from there. They'd have to view the shopping bag to see the entire contents if they were buying a bunch of items. (And I'd stipulate that somewhere, of course)

Just wanting to know if it's even possible to stop the loop of showing the shopping cart items after a certain number is reached, basically. And if so, if anyone could explain a bit about how that would be accomplished.

I'm a Comp. Sci. major that's just waaaay out of practice, so a basic explanation of the code/file will do me just fine and I can figure it out from there. :w00t:

I appreciate it!

Using version 3.0.15 btw

Link to comment
Share on other sites

With only a basic understanding of html and a fair grip on how cubecart works, you can easily code the shopping basket box to not list any items there at all, rather just showing the number of items in basket and the amount. That way, no worries about a dynamic list at all, and you cann do all the necessary magic in justt a skin file that doesn't affect store core files at all, by editing skins/your-skin/styleTemplates/boxes/shoppingCart.tpl

If you wish to limit the loop list to five items, you only need to know php and you would add a limit to the loop in includes/boxes/shoppingCart.inc.php

Link to comment
Share on other sites

Guest slshimerdla

Yeah, I didn't want to have to remove it entirely, but that's what I was going to do if I couldn't find a way around it.

PHP I'm really weak on, but now that I know where to look, I'll see what I can figure out. Thanks for the help :P

Link to comment
Share on other sites

Guest acematti

Yeah, I didn't want to have to remove it entirely, but that's what I was going to do if I couldn't find a way around it.

PHP I'm really weak on, but now that I know where to look, I'll see what I can figure out. Thanks for the help :)

Just wondering if you got anywhere with this?

Im also wanting to just display the amount of items in the cart as apposed to a detailed list of the cart.

Any help greatly received.

Matt

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...