Is this add-on dead? Maybe someone can take it over?
This add-on should be marked as unmaintained
What are the 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?
We also have a forum sales add-on which provides sort of classifieds features.XFA has a marketplace/shop addon. https://xenforo.com/community/resources/xfa-rm-marketplace-shop-xf2.6064/
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.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
That seems like a pretty simple fix.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 ,)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.
public function setPrice($price, $currency)
{
$this->listing->price = $price;
$this->listing->currency = $currency;
}
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;
}
<xf:textbox name="price" value="{{ !empty($listing.price) ? $listing.price : $category.draft_listing.price }}" placeholder="{{ phrase('price') }}" style="width: 120px" />
<xf:numberbox name="price" value="{{ !empty($listing.price) ? $listing.price : $category.draft_listing.price }}" placeholder="{{ phrase('price') }}" style="width: 120px" />
Should this be reported to XF?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
We use essential cookies to make this site work, and optional cookies to enhance your experience.