Zen Cart Logo

shoppingCart Prefix

Views: 901

Results 1 to 7 of 7
20 Apr 2011, 9:09 PM
#1
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

shoppingCart Prefix

Hi, I wanted a shoppingCart Prefix so i tried fooling around with the tpl_shopping_cart.php file from templates/sideboxes.

First thing I did was to add '•' like this, to $content .= '•' . '<li>'; at line 18.

then I did the following styling in my stylesheet.css:

#cartBoxListWrapper ul{margin-left:4px;}
#cartBoxListWrapper ul li{margin-left:20px;margin-top:-25px;width:90%;}

To me this seems like a rather brute way to go about it.. is there an easier way to achieve what I'm trying to do??

Thanks
Soniccc

20 Apr 2011, 9:27 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: shoppingCart Prefix

So you're saying that you hard-coded and jury-rigged a way to make typical list item markers show on a list? How about

#cartBoxListWrapper ul li {display: list-item; list-style: inside;}

along with any properties needed to tweak the display to your liking.

20 Apr 2011, 9:54 PM
#3
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: shoppingCart Prefix

That's what made me feel like an idiot (the hard-coding and jury-rigging) I did that because I got a margin problem with the second line of the cart item title (one I think you already know of) and this also appeared when using display-list. It looks like this:

• 1000st.- *GÜT CNe 50
BOM, 100 M sort fä

By hard-coding I could achieve this:

• 1000st.- *GÜT CNe 50
BOM, 100 M sort fä

20 Apr 2011, 10:00 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: shoppingCart Prefix

Did you mean that ```
By hard-coding I could achieve this:

• 1000st.- *GÜT CNe 50
BOM, 100 M sort fä


Using list-style: outside; and padding-left on the <ul> will move the whole list over so the markers can be "outside" the list and still within the box.
20 Apr 2011, 10:06 PM
#5
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: shoppingCart Prefix

Well that pretty much does it. It seems there's always an easier way (one I don't know of) to do stuff.. where do you learn all this??

Thanks!
Soniccc

20 Apr 2011, 10:09 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: shoppingCart Prefix

Various CSS books, and lots of online resources. https://www.w3schools.com is a good one for much of it, though they are sometimes out of date, especially with PHP (the preg_ functions are not even mentioned and it still describes the deprecated ereg_ functions).

20 Apr 2011, 10:17 PM
#7
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: shoppingCart Prefix

I'll try those resources so that hopefully I can contribute in a few years!

thanks again!