Adding Text To Price Field

This is a discussion on Adding Text To Price Field within the v3.1 Questions & Support forums, part of the v3.1 Legacy Help & Support category; I need to be able to add "Or Best Offer" to a price field. What edits are required to do ...


Go Back   68 Classifieds Forums > v3.1 Legacy Help & Support > v3.1 Questions & Support

 
LinkBack Thread Tools Display Modes
  #1  
Old 02-20-2008, 01:33 PM
Member
 
Join Date: Jan 2008
Posts: 70
Rep Power: 6
Default Adding Text To Price Field

I need to be able to add "Or Best Offer" to a price field.

What edits are required to do this?

Ken

__________________
v3.1.10 Designer
Reply With Quote
  #2  
Old 02-20-2008, 01:37 PM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,346
Rep Power: 99
Default

Do you need this global for all listings or just certain ones?
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter
Reply With Quote
  #3  
Old 02-20-2008, 02:09 PM
Member
 
Join Date: Jan 2008
Posts: 70
Rep Power: 6
Default

At this point I think I can safely say, all listings/global. Since we are the only ones putting up ads, no outside users I think it would be ok to make it cover any listing.

Hope that wing is getting better.

Ken
__________________
v3.1.10 Designer
Reply With Quote
  #4  
Old 02-20-2008, 03:05 PM
Maffo's Avatar
The Master
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,399
Rep Power: 41
Default

This is a very simple thing to do, its just a bit of a pain as you will need to go through each of the template files that contains prices.

For example, in showlistings.tpl

PHP Code:
{if $viewprice=="Y"}
            <
tr
                <
td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
                <
td>{$listingprice}</td>
            </
tr>
            {/if} 
After {$listingprice} simply type in 'Or Best Offer'

Off the top of my head you will need to edit

showlistings1 & 2
viewlisting1 & 2

If you are running the developer edition you may struggle to do this to the featured listings on the homepage
__________________
Super Mod v4 Is out and ready for download. DEMO
Purchase V4 Super Mod BETA at Reduced Price

Visit Me @ Classified-Sofware.co.uk

**Important** - All modules with the exceptions of the Bulk Upload System will be removed from my modshop on Tuesday September 30th. If you require a module you must get it before that date.
Reply With Quote
  #5  
Old 02-20-2008, 03:20 PM
Member
 
Join Date: Jan 2008
Posts: 70
Rep Power: 6
Default

Thanks for the suggestions Maffo, but I'm thinking that I don't want to be bound to add any text be it "Or Best Offer" or "Call for a quote" to any price field automatically. There may be a situation where we do want to enter a firm price. If I'm understanding what you're suggesting the text would be added no matter what is enter into the price field.

Not being a coder I thought there must be a mechanism that allows only numeric characters or excludes alpha characters, otherwise it seems you could put in any character on the keyboard. But again, I'm learning how all this stuff works.

As things go along if we need to upgrade to the developer version we will, that's not a problem.

Ken
__________________
v3.1.10 Designer
Reply With Quote
  #6  
Old 02-20-2008, 03:46 PM
Maffo's Avatar
The Master
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,399
Rep Power: 41
Default

A: I would suggest the developer edition anyways.

B: You could cheat and have a 'special-price'. Eg you enter the price as 1234.56

Then within your code in the places i have told you can have a piece of code such as

PHP Code:
<td>{if $listingprice=='1234.56'}Or Nearest Offer
{else}
{
$listingprice}
{/if}</
td
You could have a couple of different codes such as 6543.21

PHP Code:
<td>{if $listingprice=='1234.56'}Or Nearest Offer
{elseif $listingprice=='65.4321'}Call For Quote
{else}
{
$listingprice}
{/if}</
td
Its not the best way to do things but it may fix your needs
__________________
Super Mod v4 Is out and ready for download. DEMO
Purchase V4 Super Mod BETA at Reduced Price

Visit Me @ Classified-Sofware.co.uk

**Important** - All modules with the exceptions of the Bulk Upload System will be removed from my modshop on Tuesday September 30th. If you require a module you must get it before that date.
Reply With Quote
  #7  
Old 02-20-2008, 10:40 PM
Member
 
Join Date: Jan 2008
Posts: 70
Rep Power: 6
Default

Looks like a great solution for what I want. There are really only two message I'd want to have in addition to, or instead of a numerical price.

Thanks Maffo.

Ken
__________________
v3.1.10 Designer
Reply With Quote
  #8  
Old 02-21-2008, 08:24 PM
Chaslie's Avatar
Moderator
 
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Posts: 701
Rep Power: 26
Default

Another option is to use the 'Price Descriptor' module. This allows you to add anything before the price, after the price or both.

eg:
Reduced to $xxx this week only
Special Offer $xxx (only 6 available)
SOLD $xxx
etc, etc

Quote:
For 68 Classified versions v3.1.3 and above.

Overview: This module provides 2 extra fields to add text before and/or after the price field. This input appears in checkout, view listing, modify listing, admin/add listing, admin/modify listing, in the search results and in new listings, top listings and favorite listings, most viewed listings, and featured listings. Rather than a listing just having its price displayed (eg: $250), the mod allows you to have the option to add a word(s) to display in front of the price field (Pre Price) and/or following the price field (Post Price). The Price 'Pre' and 'Post' fields are option (not mandatory)
It's available from here (http://www.mods.auscity.com) - but just relised there is a problem with the site - give us a few hours to sort out.
__________________
Chaslie
V3.1.10 dev
AUSCITY

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals

HTML Help
W3 Schools
Reply With Quote
  #9  
Old 02-21-2008, 08:27 PM
Maffo's Avatar
The Master
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,399
Rep Power: 41
Default

Sorry Chaslie, didnt even think there.
__________________
Super Mod v4 Is out and ready for download. DEMO
Purchase V4 Super Mod BETA at Reduced Price

Visit Me @ Classified-Sofware.co.uk

**Important** - All modules with the exceptions of the Bulk Upload System will be removed from my modshop on Tuesday September 30th. If you require a module you must get it before that date.
Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MOD: Price Descriptor Chaslie v3.1 Modules & Modifications 7 02-27-2008 04:23 PM
Text in Price Field? dphibb v3.1 Questions & Support 5 07-09-2007 10:12 AM
Adding extra field to search.php... abkeller v3.1 Modules & Modifications 4 06-05-2007 01:15 AM
removing the price field on some categories manilaboy v3.1 Questions & Support 2 11-26-2006 07:09 PM
How do I make it so people can input text in the price field...... sbuell20 v3.1 Questions & Support 1 08-05-2006 07:24 PM


All times are GMT -4. The time now is 08:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21