The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
May 23, 2012, 04:17:40 AM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,604 Posts in 625 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto, iRealty and iLister v.4.x
| |-+  General iAuto Discussions
| | |-+  Mark as Sold link?
« previous next »
Pages: [1] Print
Author Topic: Mark as Sold link?  (Read 446 times)
cargenie
Newbie
*

Karma: 0
Posts: 23


Car Genie Australia


View Profile WWW
« on: February 18, 2011, 11:41:48 AM »

Hello,
I was wondering if it were possible to make a link that will mark a listing as sold?

I know there is the checkbox on the edit listing page but I would like to have a 'Mark as Sold' link on the my listings page.
So it would be kind of like | Activate Listing | Delete Listing | Mark as Sold |, etc.

I would like a user to be able to just click the link on the my listings page, rather than having to go to edit their listing tick the 'sold' box and then save the ad.

Is this possible?

Thanks!
Logged

Arthur
Jr. Member
**

Karma: 2
Posts: 81


View Profile
« Reply #1 on: March 03, 2011, 03:53:41 PM »

You can add following code to to the beginning of this template
http://demo.worksforweb.com/iAuto/admin/edit_templates/?module_name=classifieds&template_name=my_listing_controls.tpl
Code:
<script>
{literal}
function setSold(url,listing_sid)
{
$.get(url, {Sold:1,listing_id:listing_sid,action:'save_info'}, function(data) {
  $('#listing_sold').html('Sold');
});
}
{/literal}
</script>
And after it just add this line to any place where you would like to place mark as sold item
Code:
{if $listing.Sold eq 'true'}[[Sold]]{else}<div id="listing_sold">
<a href="#listing_sold" onClick="javascript:setSold('{$GLOBAL.site_url}/listing/edit/{$listing.id}',{$listing.id})">[[Mark as sold]]</a>
</div>{/if}
It was made for latest version that's why maybe you will need to modify this code.
Hope this will help.

Regards
Arthur
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!