Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Adding another Form to Classified Adverts

  1. #1
    Thread Starter
    Amateur
    Not a Verified Customer
    Joshharris's Avatar
    Join Date
    Jul 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding another Form to Classified Adverts

    Hey!
    I am looking to add another form field to the bottom of each classified advert (between the ad description and Url/stats)
    I want just 3 Fields - Name, Email and Sealed Bid. I want it to be like the contact form where the results get emailed to the seller but I do not want it to be in the same form on the side instead in the main part of the advert. Does anyone have any ideas?

    Also on the main categorys has anyone noticed that the price sorting does not actually sort the price? It sorts by Ascending/Descending but depending on the first number in the price. so £95 would be above £8500 simply because 9 is higher than 8.

    Thanks

  2. #2
    Rookie axleman's Avatar
    Join Date
    Jul 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding another Form to Classified Adverts

    Sorting by price is bugged, I guess because the field is technically a text field, not a number field.

  3. #3
    Junior Member joshthomas80's Avatar
    Join Date
    Jun 2009
    Location
    Austin, TX
    Posts
    33
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Adding another Form to Classified Adverts

    Is there a way to fix this in the code?

    So, the default way the price field sorts numbers is alphabetically,
    where 1 is first and 2 is second, but also 210 would come before 30
    and 5000 before 6.

    Based on the research I've done so far, we need to change something
    about the postmeta...I think...in order to sort numerically.

    David, can you help us with this? If sorting by price is an option, it ought to work properly, right?
    Josh Thomas
    Out of Work Ninja
    Dominate With Video Sales Letters

  4. #4
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: Adding another Form to Classified Adverts

    Yeah, since the price is using a WP postmeta field which only comes in varchar (text), I didn't think it was possible to sort numeric values correctly.......until I did some research and figured it out!

    Edit your index.php page and look for the following line:

    Code:
    <a href="?sort=meta_value&key=price&order=asc">
    Now replace that with this code:
    Code:
    <a href="?sort=meta_value+0&key=price&order=asc">
    That should now sort the numeric values correctly. Remember, the highlighted feature ads will take precedence and sort first. Then your regular ads will come sorted next.

    This fix will be included in the next release. Thanks to this wordpress support post for providing the solution.

  5. #5
    Junior Member joshthomas80's Avatar
    Join Date
    Jun 2009
    Location
    Austin, TX
    Posts
    33
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Adding another Form to Classified Adverts

    Thanks David,
    I found that post too, but wasn't quite sure how or where to implement it.

    This is a good fix.
    Josh Thomas
    Out of Work Ninja
    Dominate With Video Sales Letters

  6. #6
    Thread Starter
    Amateur
    Not a Verified Customer
    Joshharris's Avatar
    Join Date
    Jul 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding another Form to Classified Adverts

    This fix still fails to fix the problem for me
    I can sort by Desc and cars which cost £950 are in the with cars costing £9000-10000. For example:
    £10000
    £9800
    £975
    £8000
    £795
    £7000

    I have tried the fix mentioned ^^ and it has not fixed the problem

  7. #7
    Junior Member joshthomas80's Avatar
    Join Date
    Jun 2009
    Location
    Austin, TX
    Posts
    33
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Adding another Form to Classified Adverts

    He's right. This did not fix the problem. Any other ideas as to how we can do this?

    Am I in the right place? This is where I'm going...

    domain.com/wp-content/themes/classipress/index.php
    Josh Thomas
    Out of Work Ninja
    Dominate With Video Sales Letters

  8. #8
    dubya's Avatar
    Join Date
    May 2009
    Location
    Canada
    Posts
    1,000
    Thanks
    115
    Thanked 107 Times in 93 Posts

    Re: Adding another Form to Classified Adverts

    If I'm understanding this correctly, the "0" that is added to the code above is a place holder which will prevent 10 from sorting before 02.
    Try adding more zeros... I think "00" will prevent 100 from sorting before 002 etc... etc...
    I haven't tried this yet, so let me know.
    The search button. Your new best friend.
    - Dubya

  9. #9
    Affiliate Member AppThemes Affiliate cjseven's Avatar
    Join Date
    Jun 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding another Form to Classified Adverts

    Hi!

    This hack doesn't work... At least for me! Anyone has the solution?

    This is a kind of killer bug for this theme.

    Didn't test enough and now have one customer asking me about this...

    Any feedback would be great.

    Thanks,

    António
    [url="http://www.licenciados.info"]http://www.licenciados.info[/url] | [url="http://www.formacao.info"]http://www.formacao.info[/url] | [url="http://www.alugarquarto.net"]http://www.alugarquarto.net[/url] | [url="http://www.alugarapartamento.net"]http://www.alugarapartamento.net[/url] | [url="http://www.comprarapartamento.net"]http://www.comprarapartamento.net[/url]

  10. #10
    Junior Member
    Not a Verified Customer
    Spacifieds's Avatar
    Join Date
    Aug 2009
    Location
    California
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding another Form to Classified Adverts

    bump...

    Really the more I think about this, the more I think it might be more important. I know when I search for items on Ebay, I like to sort the results by price which makes finding items in your price range much faster than pouring over hundreds of listing to find what you're looking for.

    Though this is not a huge issue, but I'd like my members to be able to sort numerically by price. Can look forward to a fix for this in the next version of CP perhaps? Does someone out there have a fix?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)