Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Price Per Item / Weight

Price Per Item / Weight

Locked

Views: 997

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
2 May 2008, 2:28 PM
#1
glenelkins avatar

glenelkins

New Zenner

Join Date:
Apr 2008
Posts:
31
Plugin Contributions:
0

Price Per Item / Weight

i dont know if im explaining this corretly in my other posts

I have created a template, I am a web developer so Ihave no issues with changing code.

Though I would like to know how to do the following:

If i add a product in the admin, i set a price. Lets say the product is Sirloin Steak, at £10.00

I have another product called Braising Steak but this time i want the price to be £10.00/Per Kg

How would I have the system display "Per Kg" after the price, for that individual product? All i can think of is adding an extra field in the products table of the database and changing a bunch of code to allow it to work..

Is there a quicker way?

2 May 2008, 2:46 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Price Per Item / Weight

A bit tedious, but you can create Product-specific stylesheets in ZC (read the readme files in the CSS folder of the classic template to see how).

Then, create a <DIV ID...> (probably in tpl_product_info_display, in the BOF PRICE element) to show a DEFINE TEXT where the text is "Per Kg".

When done, you can experiment with CSS declarations like "display: none; " to either reveal or hide the new element, depending on the product.

You could also try conditionals in the php " if xxxxx ", where the DEFINE is called if the product ID matches the one where the "per Kg " is needed.

This will need hard coding of the product ids into the core code - tedious, but what can you do :huh: