Classifieds

Classifieds [Paid] 1.2.0

No permission to buy ($60.00)
The counters of the active classifieds are wrong. I can't figure out why. I've tried to delete them, create new ones and I've let them expire. That didn't lead to the wrong numbers. Still, after a while it shows fewer items than actually available....
A rebuild fixes the numbers only for a short time and they become false again eventually.
 
The counters of the active classifieds are wrong. I can't figure out why. I've tried to delete them, create new ones and I've let them expire. That didn't lead to the wrong numbers. Still, after a while it shows fewer items than actually available....
A rebuild fixes the numbers only for a short time and they become false again eventually.
Did you ever figure this out?
 
This add-on should be marked as unmaintained

Definitely. Unresolved bug reports for over a year and no support, he ignores questions from users here and on his forum.
It's abandonware, stay away if you don't like throwing money out of a window. There are several good alternatives.
 
I don't think there are any developers involved with this, there is a non-developer that just does support I believe.

What are the alternatives?
 
For some of the smaller bugs I've been fixing them myself. What are the main issues people have now, perhaps I already squished it 😊
 
We also have a forum sales add-on which provides sort of classifieds features.
 
For some of the smaller bugs I've been fixing them myself. What are the main issues people have now, perhaps I already squished it 😊
Main one I have is if you enter a price such as "11,012.00" the cost shows as 11 I believe. Reported some time ago but never fixed. Major issue if people can't list their products properly with a major error in cost for the listing.
 
Main one I have is if you enter a price such as "11,012.00" the cost shows as 11 I believe. Reported some time ago but never fixed. Major issue if people can't list their products properly with a major error in cost for the listing.
That seems like a pretty simple fix.

I see though that some countries use 11012,00 so it will have to allow for that (ie not just remove the , which would work for the first example!)
 
Also, if you are unhappy with the product/support, don't forget to leave a review. It can help when others are looking for addons to buy, and to help them make good decisions.
 
Main one I have is if you enter a price such as "11,012.00" the cost shows as 11 I believe. Reported some time ago but never fixed. Major issue if people can't list their products properly with a major error in cost for the listing.
Had a quick look at the code on the train going home and this is due to the float filter being run on the price - it creates a number from string, but will stop when it reaches an invalid char (which in this case is the ,)

Quickest solution is just to remove commas from submitted prices (if the backend specified decimal point character isn't a comma)

\Z61\Classifieds\Service\Listing\ListingShared.php

Find:
PHP:
    public function setPrice($price, $currency)
    {
        $this->listing->price = $price;
        $this->listing->currency = $currency;
    }

Change:
PHP:
    public function setPrice($price, $currency)
    {
        if (\XF::language()['decimal_point'] != ',' && strpos($price, ',') !== false)
            $price = str_replace(",", "", $price);

        $this->listing->price = $price;
        $this->listing->currency = $currency;
    }

I'd even be tempted to say this is a xenForo bug - as if this is commonly used (in the US?) then the filter should account for this.
 
On further inspection - this "bug" happens with other official XenForo addons too (Resource Manager for example) - the backend methods used for both are the same.

I'm curious why the input allows text at all though - in fact you can ignore my edits above and simple change the template:

z61_classifieds_listing_edit_macros​


Find:
Code:
<xf:textbox name="price" value="{{ !empty($listing.price) ? $listing.price : $category.draft_listing.price }}" placeholder="{{ phrase('price') }}" style="width: 120px" />

Change:
Code:
<xf:numberbox name="price" value="{{ !empty($listing.price) ? $listing.price : $category.draft_listing.price }}" placeholder="{{ phrase('price') }}" style="width: 120px" />

Now it won't let you put in , (or anything that isn't a number) even if you wanted to :)
 
Top Bottom