Support Forums

Old 06-08-2006, 03:24 AM   #1
Member
 
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Price checking by Listing Package

Is there anyway that when someone is placing an Ad that you can check the price of the item against the package listing.

On my site I have two listing packages -
  • FREE Package for items up to $500
  • PAID Package for items $500 and over

What is there stopping a person selecting the free package but placing an Ad for an item for say $2500. I have tested this and goes through fine. The only mechanism I can see is to manually check every Ad that goes on.

Is there some way that when someone is placing an Ad to verify the price of the item they enter falls within the pricing of the listing package - as in my case that a FREE Ad listing has a price of less than $500.

Or is this very hard to implement.
__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Bucketman is offline  
Old 06-08-2006, 09:18 AM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,548
Rep Power: 103
Eric Barnes is a jewel in the rough
Default

It would require some manual changes.

To do this you would need to find out the package id then edit the usercheckout.php file around line 434.
You should see:
$listingprice = ereg_replace("[^.[:alnum:]]","",$listingprice);

Just under it add:
PHP Code:
if($productid==&& $listingprice 500)
{
$listingprice=500;

Basically that says if the package id is 1 and the price is over 500 then reset the price to 500.
__________________
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
Eric Barnes is offline  
Old 06-08-2006, 10:44 AM   #3
Member
 
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Thanks for that - I changed it a little

What I have done is use the following:

Code:
if($productid==1 && $listingprice >= 500)
{
$productid=2;
} 
Also, just in case anyone else wants to do this the line was 834 in my usercheckout.php file.

What the above does is check the price and if it is $500 or over, and the listing package selected is for items less than $500 it changes the listing package to the PAID listing package - which should stop anyone getting around paying for more expensive item ads.

I have put several test ads up and it is working.

Anyone see any issues with me doing it this way....
__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Bucketman is offline  
Old 06-08-2006, 10:55 AM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,548
Rep Power: 103
Eric Barnes is a jewel in the rough
Default

Ashley,

Good thinking.

The only thing I would see is they might get the same ad features as package 2 has. But then again they are trying to cheat you.
__________________
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
Eric Barnes is offline  
Old 06-08-2006, 11:04 AM   #5
Member
 
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Yeah - they will

But that's OK - because they will be forced into paying for it - so the old saying 'you get what you paid for' will certainly ring true for them.

I guess it all sounds a little silly but I don't want people trying to list expensive items for sale through my FREE listing package - which is only for cheap items.
__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Bucketman is offline  
Old 06-30-2006, 04:02 PM   #6
Member
 
Join Date: Jun 2006
Posts: 59
Rep Power: 13
e1m2j is on a distinguished road
Default

Any thoughts on how I might code this for multiple levels?

i.e. packages 1 and 2 for ads under $20, packages 3 and 4 available for ads $20.01-50.00, packages 3 and for available for ads $50.01-$100, etc.
e1m2j is offline  
Old 08-01-2006, 01:23 PM   #7
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,548
Rep Power: 103
Eric Barnes is a jewel in the rough
Default

Sorry I must have missed your post but I saw it in the other thread.

What you would do is have multiple if elses. For example:
PHP Code:
if(($productid==|| $productid==2) && ($listingprice >= 20 || $listingprice >= 50)
{
$productid=3//assign to package number 3
}
elseif(
$productid==&& $listingprice >= 100)
{
$productid=4;//assign to package number 4

Of course you would need to edit this to match your package id's and also make sure the logic is correct.
__________________
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
Eric Barnes is offline  
Old 08-01-2006, 02:16 PM   #8
Member
 
Join Date: Jun 2006
Posts: 59
Rep Power: 13
e1m2j is on a distinguished road
Default

Quote:
Originally Posted by suzkaw
What you would do is have multiple if elses. For example:
PHP Code:
if(($productid==|| $productid==2) && ($listingprice >= 20 || $listingprice >= 50)
{
$productid=3//assign to package number 3
}
elseif(
$productid==&& $listingprice >= 100)
{
$productid=4;//assign to package number 4

Thanks. Just to clarify, since php isn't my strong suit:

What is the first part saying ($productid==1 || $productid==2) && ($listingprice >= 20 || $listingprice >= 50)?

Is that saying if productid=1 and the listingprice is $20 or more, or if packageid=2 and listingprice is $50 or more automatically assign package 3?

The rest I seem to get
if productid=3 and listingprice is $100 or more, assign package 4

and I can extend those elseif statements along indifinitely.


Can such code handle multiple options, i.e. $20 or less is package 1 or 2, $20.01 to $50 is package 3 or 4, $50.01 to $100 is package 5 or 6?

For example, there could be one package with just text and one with photos at each price level.
e1m2j is offline  
Old 08-01-2006, 03:16 PM   #9
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,548
Rep Power: 103
Eric Barnes is a jewel in the rough
Default

I did see a few errors. Here is an updated if statement with some more details:
PHP Code:
if(($productid==|| $productid==2) && ($listingprice >= 20 || $listingprice <= 50)) 
That says if they selected productid 1 OR 2 AND the listingprice is greater than or equal to 20 OR listingprice is greater than or equal to 50.

Quote:
Can such code handle multiple options, i.e. $20 or less is package 1 or 2, $20.01 to $50 is package 3 or 4, $50.01 to $100 is package 5 or 6?
Yes it would be easier this way too.
PHP Code:
if($listingprice '20.00')
{
$package=1;
}
elseif((
$listingprice '20.00') || ($listingprice '50.00'))
{
$package=3;
}
elseif(
$listingprice '50.00') || ($listingprice '100'))
{
$package=5;

__________________
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
Eric Barnes is offline  
Old 08-01-2006, 03:58 PM   #10
Member
 
Join Date: Jun 2006
Posts: 59
Rep Power: 13
e1m2j is on a distinguished road
Default

Thanks.

I know I'm being dense and taking up way too much of your time.

But, I don't see where the code
PHP Code:
if($listingprice '20.00')
{
$package=1;
}
elseif((
$listingprice '20.00') || ($listingprice '50.00'))
{
$package=3;
}
elseif(
$listingprice '50.00') || ($listingprice '100'))
{
$package=5;

allows multiple packages per price range.

Wouldn't it be something more like
PHP Code:
if($listingprice '20.00')
{
(
$package=|| $package=2)
}
elseif((
$listingprice '20.00') && ($listingprice '50.00'))
{
$package=|| $package=4);
}
elseif(
$listingprice '50.00') && ($listingprice '100'))
{
$package=|| $package=6);

showing my na�vet�, I know.
e1m2j is offline  
 

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 03:23 PM
User: See's Membership listing package garysr v3.1 Questions & Support 23 11-04-2006 01:08 PM
Listing package - 0.00 where I can delete this???? akm v3.1 Questions & Support 3 06-25-2006 08:30 PM
Delete Listing Package ... what happens to listings? hppenterprises v3.1 Questions & Support 2 06-02-2006 05:08 PM
Large price field entry causes listing to be hidden in admincp civ v3.0 Questions & Support 1 04-07-2006 10:04 AM


All times are GMT -4. The time now is 01:38 AM.


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