Author Archive

Add a listing tab to redirect to shop page

In your child theme functions.php file add this code

 

function listeo_add_shop_listing_tab(){

	if (!class_exists('WeDevs_Dokan')) {
		return;
	}
	$queried_object = get_queried_object();


	if ($queried_object) {
		$post_id = $queried_object->ID;
	} else {
		return;
	}

	$vendor_id = get_post_field('post_author', $post_id);
	$is_vendor = get_user_meta($vendor_id, 'dokan_enable_selling', true);

	if (!$is_vendor || $is_vendor == 'no') {
		return;
	}

	$vendor            = dokan()->vendor->get($vendor_id);

	$store_url         = $vendor->get_shop_url();
 	echo "<li><a href='".$store_url."'>Shop</a></li>";

 
}
add_filter('listeo/single-listing/navigation-end', 'listeo_add_shop_listing_tab');

The result wil be:

Stripe Split Payments Support

Feature available since Listeo version 1.9

Listeo offers support for Stripe Connect that allows you to automatically split the payment for a booking and send part of the payment to the listing’s Owner and part to you as a site owner. Stripe Connect is a service provider for marketplace payment solutions.

This requires having the official WooCommerce Stripe Payment Gateway installed and configured, only the payments made by this gateway will be split.

With Stripe you can accept Visa, MasterCard, American Express, Discover, JCB, and Diners Club cards, and even Bitcoin and is supported in 47 countries

With a Stripe Connect, you create a platform to which Listing Owners can signup and “connect” and that helps you automate payments and simplifies the usage of your site.

 

How it works


You have to enable your Connect Platform in Stripe dashboard. After properly configuring both Stripe and WordPress according to instructions below, the Wallet page will have an option “Connect to Stripe“.

Any Listing Owner who will click this button will be going through the “onboarding” process where he will set his own Stripe account and connect it to your platform. From now on every booking that will be made using Listeo that will be paid with Stripe gateway will be automatically splitted and you as platform owner will get the commission and the Owner will get his earning directly to his Stripe account. The money is then payout automatically by Stripe based on the settings or rules (it’s different based on the country)

 

How to configure Stripe Connect in Listeo


Let’s get started

  •  Create a stripe account by visiting https://stripe.com/.
  • After successful registration login to Stripe Dashboard go to Connect, then go to “Get started with Connect“, where you will be able to complete your platform profile and add required informations to enable payments on your account
  • Enable Test Mode
  • Get Client ID. For that go to Settings (the cog icon above the “Test mode”), scroll down to Integration section, copy your Test Client ID and paste it in Listeo Core -> Stripe Connect -> Stripe Connect Test mode Client ID.
  • Turn on both OAuth Settings
  • in Redirects section click +Add URL, and add there a link to your wallet page with /?stripe-setup=yes at the end, so the whole link would be
    https://www.yourdomain.com/wallet/?stripe-setup=yes
  • Now Switch to Live mode and repeat those steps, get the Live Client ID to set it in Listeo Core, enable OAuth settings and add Redirect.
  • Setting up WooCommerce payment gateway:
  • Install WooCommerce Stripe Payment Gateway
  • Go to wp-admin -> WooCommerce -> Settings -> Payments, find Stripe on the list, go to Manage and connect to your stripe account, it should automatically get all required API keys, but to be sure go to Settings, click Edit Account Keys and make sure both test and live keys are set.
  • Set the webhook in your Stripe Account Settings as it’s explained in the popup. It’s important as this webhook is what is used to get data about payment.
  • It’s important to know that this feature in Listeo is in its early stage and although we did a lot of testing we strongly encourage to run it in Test mode first to make sure everything works as expected. To do that go to wp-admin -> WooCommerce -> Settings -> Payments -> Stripe -> Manage -> Settings and check the “Enable test mode” checkbox

After Connecting to Stripe, users will have a new box in Wallet page with few informations about his account and option to login directly to Stripe Dashboard to see all details about the payments to his account.

Example view of Stripe Dashboard for Listing Owner

Listing types – explanation

This is one of most common questions we get on the support – “how/where can I change listing types”

Listeo has 4 listing types – Service, Rental, Event and Classifieds. Those listing types exist to have different booking options, so you won’t offer for example tickets for renting out apartments. If you want to disable the ones you don’t need you can do it in Listeo Core -> Submit listing.

If you want to rename them, you can use this method.

There’s currently no option to add more types without modifying code, remember, those types do not exist for classification purpose, for that you have Taxonomies.

PayPal Split Payments Support

[Discalimer] Listeo supports hundreds of payment gateways however split payment could be technically integrated only with PayPal (at least at this moment). It’s optional and you don’t have to use it. 🙂

Listeo offers option to split payment made for bookings, that way you as site admin don’t have to worry about transfering money back to listing owners. It’s automatically split between the vendor and you, so you get your commission, and listing owner gets his part for booking.

Feature not found in any other theme. 😎

This feature requires PayPal Payouts option enabled on your PayPal account.

In order to use this service, you must have a business PayPal account in good standing and with no withdrawal limits and  applied for and received PayPal permission to use these services. To apply for that check details here.

How to configure it?


Step 1

Go to Paypal’s Developer portal and click on Dashboard in the dropdown located on the top left of the screen. Now go to My Account and check if you have Payouts API enabled, there should be a green check mark next to it. If you don’t you need to apply for it.


Step 2

Once the above is done, go to My Apps & Credentials. Scroll down till you find the REST API apps” section. Click the Live option on the Sandbox/Live button. Next, click the Create App button. Provide name and click Create App“. Now on the My Apps page you have your new app listed, click it to open a page with credentials.


Step 3.

in new tab login to your Listeo site wp-admin, go to Listeo Core -> PayPal Payout, set it to Active. Choose the Live Environment, and provide your details from the App Credentials

And that’s pretty much this.

Now make sure that you have PayPal configured as Payment option in WooCommerce → SettingsPayments


How does it really work?

If you configured things above correctly, your listing owners will have to provide their paypal email in Wallet →  Set Payout Methods → PayPal Payout. They will see notification in their dashboard about this requirement.

Now, when someone pays for booking, as before it will create a Order in WooCommerce (and that Order will have to have it’s status set as Completed, manually or using Autocomplete WooCommerce Orders)  and the payment minus the commission will be automatically send to listing owner.  In wp-admin -> Commissions you will see list of payouts, you might see them with status “Pending”

Here’s why you might see this status. Pending states payments will return to your account after 30 days if the payment is not collected.

 

Listing type taxonomies relations

In version 1.6.27 we’ve added option to make Listing type taxonomies (Rental Categories, Service Categories, Event Categories) related to the main Listing Category taxonomy.

To use that option, go to Listeo CoreBrowse/Search Options Make “listing type” taxonomy related to categories – set to Enabled.

Now, when you edit any category in ListingsCategories, you can set to which Listing Type taxonomy it will be connected

Now, you have to have in Search Form all those taxonomies added as element (You can add them in Listeo Editor Search Forms).

The Listing Type search field (rental/service/event) will be displayed now based on user selection of Listing Category.

Also, when Listing Owner will go to Add Listing page form, he will see only categories in Listing Category field that are related to the Listing Type he chose on first step.

Google Reviews Support

This feature is available from version 1.6.20. For users who upgraded from older version, make sure to add “Place ID” field in Listeo Editor -> Fields -> Location, and in Listeo -> Add Listing Form

To use that feature you need to have UNRESTRICTED API key set for radius search (Listeo Core → Map Options → Google Maps API key for server side geocoding).

Listeo has option to show 5 latest reviews from Google Reviews for the listings.

To use it, you have to provide Place ID for the listing. If you are using Google Address auto suggestion feature, this will be automatically set if you choose a business/establishment/place from the suggestion list (yes! we have now option to actually search for places, not just address).

If you are using other map providers, you can get the Place ID from Places ID-finder. You can also use this method if Places ID finder doesn’t work for you

Places API allows to show only 5 reviews from that, those results are cached for 48 hours to not generate additional costs for API. To use that feature you need to have API key set for radius search (Listeo Core → Map Options → Google Maps API key for server side geocoding).

Google Reviews are not displaying, what can I do?

If you are sure your API key is configured properly, if it is, the most common reason why reviews are not showing, is because the Place ID you selected is not for the actual place but for it’s address. If you type just the address of place, you get Place ID of that address, but that doesn’t have reviews, you need to get the Place ID of actual point of interest. Example, if you type the address of pizzeria “Via dei Tribunali, 32, 80138 Napoli NA” you get different Place ID then if you type name of the place and it’s address, like ‘Gino e Toto Sorbillo, Via dei Tribunali, 32, 80138 Napoli NA’. You are looking for and ID of that place, that has the reviews.

How to solve problems with Ajax login?

If you’re trying to use Ajax login on Listeo and you get stuck on message ‘Sending user info, please wait…‘, first check if you have any cache/optimizations plugins active on your site. If you do, try to disable them to see if that help. If it does, you might need to change some settings in those plugins as they might have to aggressive optimization for this feature to work.

The issue is often connected with custom mod_security rules. Some hosting providers block login requests from non standard paths, so try to contact your hosting provider and ask them about it.

And last but not least, you may experience this issue on nginx server, in that case, add the following lines to /etc/nginx/nginx.conf
|
fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
client_max_body_size 50m;
proxy_buffer_size 16k;
proxy_busy_buffers_size 16k;
|

if that won’t help, check if you have Nginx Content caching enabled, you might need to disable that to fix that problem

Why I have so many Products on my WordPress site?

Every time you create a listing, it creates a “shadow copy” of that listing in Products. So each listing has assigned its own product in WooCommerce -> Products. This is created to handle payments for Booking, so when booking request is confirmed, it creates WooCommerce order for that product, and user is able to pay for it.
Those products are set to product type “Listeo Booking”, they are not visible on front-end, and not indexed by google.

Search by date range

Until version 1.4.3 the “date range” field was used only to search for rental listing types. Since 1.4.3 we’ve added support for event type listing, but because of the way the search works, you can search for rentals and for events at the same time. For rentals, we’re looking for dates where the listing have no bookings made, and for event we search for dates which are in the selected range.


Setting Up date range

Go to Listeo Editor -> Search Form, choose the type of search form, if it already has Date range field click it to open, if no, drag the Date range field from Available searchable elements to the place in Search form, and click Save.

Now, click this new field to open its options. You should see this.

By choosing Rentals, you will limit Date Range only to rental listing type, and by choosing Event you will search only for events.

If you have both types and want to allow users to choose, select the last option, and drag from the Available searchable elements  the Listing Type field, that will allow user to select which listing types they want to search for.

You can of course remove service type as this won’t be returning any results. Date search for services is currently not available.

Coupons

How to add Coupons functionality to Listeo

This step can be skipped in new theme installations. It applies only for installations that were updated from the version without coupons feature.

  1. Create new page, named it e.g. “Coupons” and in content of that page add [listeo_coupons]
  2. in Page Attributes, as Page Template choose “Dashboard Page
  3. Save and publish this page
  4. Go to WordPress Dashboard → Listeo Core → Pages and select your newly created page for Coupons option

How to set up a new coupon

To add a new coupon, go to Dashboard → Coupons and click Add New Coupon. The opening screen will present you with the coupon code and other settings.


How to set up a coupon widget

If you would like to display a widget with coupon code and description first you have to add Coupon Widget in Appearance → Widgets for Single Listing Page

Then you can select specific coupon and enable widget for each listing in listing editor: