Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

Adding words after Product Quantity?

30 Dec 2012, 6:34 PM
#1
bubbadan avatar

bubbadan

New Zenner

Join Date:
Apr 2005
Location:
TN
Posts:
96
Plugin Contributions:
0

Post #1 by bubbadan

I would like to add the words "lbs Left" after the display of the quantity of products.
We sell closeout fragrances and I would just like to have it very clear that the number listed means how many pounds we have left of the product in stock.

Anyone know how this could be done?

I have attached an image of how it looks now and how I want it to look if that helps.

Thank You
Bubba

Attachment 11675

Using version v1.5.7b

30 Dec 2012, 7:44 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,933
Plugin Contributions:
26

Post #2 by dbltoe

A quick answer would be to edit the tpl_products_all_default.php in the yourtemplate/templates directory BUT there are so many variables in play here. Not the least of which is, "Are ALL your products measured in pounds?"
You failed to answer any of the posting tips AND you didn't even answer the basic "What version of Zen Cart?"
We need more info and a look at the cart (READ THE *NOTE BEFORE POSTING A LINK).

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

30 Dec 2012, 9:30 PM
#3
bubbadan avatar

bubbadan

New Zenner

Join Date:
Apr 2005
Location:
TN
Posts:
96
Plugin Contributions:
0

Post #3 by bubbadan

Sorry. That info was always in my signature (As in your "reminders"). Have no idea why it isn't there anymore. Can't find where to add it in my profile either

Using version 1.5 and yes EVERYTHING is in Pounds.

Using version v1.5.7b

30 Dec 2012, 9:48 PM
#4
bubbadan avatar

bubbadan

New Zenner

Join Date:
Apr 2005
Location:
TN
Posts:
96
Plugin Contributions:
0

Post #4 by bubbadan

At least I found where to update my signature (I think)

Using version v1.5.7b

30 Dec 2012, 9:53 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,933
Plugin Contributions:
26

Post #5 by dbltoe

Under Forum Actions in the menu bar above will get you to your sig.
Meanwhile, 1.5.0 or 1.5.1, custom template, upgraded? Etc.
If customized, does your custom template have a tpl_products_all_default.php in its templates directory?
If it does, you will need to carefully modify it to make sure nothing placed there by another mod is not munged.
If it does not, you can change> <div id="allProductsListingTopNumber" class="navSplitPagesResult back"><?php echo $products_all_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_ALL); ?></div>to> <div id="allProductsListingTopNumber" class="navSplitPagesResult back"><?php echo $products_all_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_ALL , ' lbs left'); ?></div>I have not tested this on a test site, but it should work.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

30 Dec 2012, 10:09 PM
#6
bubbadan avatar

bubbadan

New Zenner

Join Date:
Apr 2005
Location:
TN
Posts:
96
Plugin Contributions:
0

Post #6 by bubbadan

Sorry... That didn't work.
Yes I have a custom template and no there was no such file in my templates

Here is the link to the page where I want the lbs. Left to be displayed if that helps

http://tradewindsfragrance.net/index.php?main_page=index&cPath=21_28

Using version v1.5.7b

30 Dec 2012, 10:53 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,933
Plugin Contributions:
26

Post #7 by dbltoe

Now we know you're using it in a category display versus product, we can get closer. Item eight down the list of Posting Tips. Knowledge is power.:P
SO.... There are only 10 tons of Aquamarine left?
Will have to look at this later, but setting text based on a specific category is doable as well.
Anyone else is free to jump in.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

31 Dec 2012, 12:52 AM
#8
bubbadan avatar

bubbadan

New Zenner

Join Date:
Apr 2005
Location:
TN
Posts:
96
Plugin Contributions:
0

Post #8 by bubbadan

Well I did post the image.
All I need is what I said... lbs left

Once I get this up the products will be split (Colors vs Fragrance) in to two different sites as both have been sold off to other companies.
I just need a simple "lbs. Left" that is all... nothing less, nothing more.

Using version v1.5.7b

31 Dec 2012, 1:56 AM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,933
Plugin Contributions:
26

Post #9 by dbltoe

Well, let's see:

  1. Never really answered posting tips.
  2. Title of the thread said nothing about where the Product Quantity was that needed the addition.
  3. Took four hours of haggling to get enough information to even come close to a solution or where one might be.
  4. Thought that an image could tell us all the php coding going on in the background or that it would inform us as to the actual page needing a fix.
  5. Finally declared that it's simple and implied that my questions were irrelevant.

As the commercial says, "Priceless".

As I said in the earlier post, This simple volunteer is simply not able to devote simple time to this simple problem till later this evening. And, any other simple volunteer is welcome to simply take over until then.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

31 Dec 2012, 6:36 PM
#10
bubbadan avatar

bubbadan

New Zenner

Join Date:
Apr 2005
Location:
TN
Posts:
96
Plugin Contributions:
0

Post #10 by bubbadan

Sorry for asking a question on a help forum!
I won't make that mistake again... I promise.

Using version v1.5.7b

31 Dec 2012, 8:48 PM
#11
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,772
Plugin Contributions:
56

Post #11 by swguy

Try looking at includes/modules/YOUR_TEMPLATE/product_listing.php
(If it's not there, copy it from includes/modules/product_listing.php).

Look at the block that prints

    case 'PRODUCT_LIST_QUANTITY':
    $lc_align = 'right';
    $lc_text = $listing->fields['products_quantity'];
    break;

try changing the setting of $lc_text to what you want.

$lc_text = $listing->fields['products_quantity'] . " lbs. left";

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

31 Dec 2012, 10:17 PM
#12
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,933
Plugin Contributions:
26

Post #12 by dbltoe

1.5.0 will look slightly different as it now uses defines> case 'PRODUCT_LIST_QUANTITY':

$lc_text = TABLE_HEADING_QUANTITY;
$lc_align = 'right';
$zc_col_count_description++;
break;Could a fix be> case 'PRODUCT_LIST_QUANTITY':
$lc_text = (TABLE_HEADING_QUANTITY , ' lbs Left');
$lc_align = 'right';
$zc_col_count_description++;
break;Or is that code incorrect?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

31 Dec 2012, 10:36 PM
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,772
Plugin Contributions:
56

Post #13 by swguy

It is incorrect. That code manages the table headings. My post shows the required changes.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

31 Dec 2012, 10:49 PM
#14
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,933
Plugin Contributions:
26

Post #14 by dbltoe

Correct! Didn't scroll down far enough:blush:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com