Listings
ClassiPress Address Field
- Plugins
- October 26, 2020
Cardinity Payment Gateway
- Payment Gateways
- October 15, 2020
Good Question plugin for WordPress against spam comments and registrations
- Plugins
- March 13, 2020
Favorite Profiles for HireBee
- Plugins
- March 3, 2020
QuickPay Payment Gateway
- Payment Gateways
- April 27, 2019
CP Addons Plugin – Featured Ads for ClassiPress
- Plugins
- February 11, 2019
PayTR Payment Gateway
- Payment Gateways
- January 15, 2019
Chatra Live Chat Plugin
- Plugins
- October 30, 2018
Taggernaut – Tag Generator Plugin
- Plugins
- July 8, 2018
Posts
Add tax item to an escrow order
This post is an addition to the article How to add taxes and discounts to a payment order and explains how to add tax item to escrow orders. We will use Taxable plugin as the basic tool for registering custom payment items.
Escrow orders introduced in the HireBee theme. They are processing differently to regular orders. So we should add modifications to make possible for Taxable plugin to add items to an escrow order.
You can add it in a custom plugin or child theme functions.php file. Or use Code Snippets plugin (more details in the instruction).
function arthemes_org_create_escrow_order( $workspace_id, $workspace ) { $order = appthemes_get_order_connected_to( $workspace_id ); if ( ! $order || ! class_exists( 'TAXABLE_Registry' ) ) { return; } $plugin = new TAXABLE_Registry(); $plugin->add_taxes( $order ); } add_action( 'waiting_funds_workspace', 'arthemes_org_create_escrow_order', 11, 2 );When a workspace and new escrow …
How to add taxes and discounts to a payment order
Taxes and discounts are popular items in payment orders. These are the price modifiers that applied to a total purchase amount regardless of items in order. And if you want to know how to configure it on your site, powered by AppThemes, this article is for you.
First, the basics. The AppThemes has own payment module included in all their themes - AppThemes Payments. The framework for processing orders and payment gateways. So, instructions below will work for all software that uses AppThemes Payments module, including all AppThemes themes.
1. Use the built-in "Tax" setting to add a tax item in all orders.This option can be enabled in General Payments settings by adding a non-zero "Rate" value.
And the order summary will look the following:
The Regional Taxes item added in the order summary table.Works pretty fine, but it has some drawbacks:
You can't change wording "Regional Tax" to something else. Only via translat…Disable receipt emails with 0 total for Vantage and Clipper themes
Receipt emails always send if option "Charge for Items" enabled in Vantage or Clipper themes. Even in cases when order total amount is 0.
There is no setting to disable such empty receipt emails, but it can be done using a small mod.
You can add it in a custom plugin or child theme functions.php file or use Code Snippets plugin (more details in the instruction).
function arthemes_org_send_user_receipt( $args ) { if ( ! empty( $args['order'] ) ) { $order = $args['order']; if ( ! (float) $order->get_total() ) { $args['to'] = null; } } return $args; } add_filter( 'appthemes_send_user_receipt', 'arthemes_org_send_user_receipt' );This code filters parameters of the receipt email and removes the receiver if order total is 0. This will work fine in most cases. But be careful using AppThemes Coupons plugin and 100% discounts as it may also generate orders with zero total.
Display a site logo on mobile view for the Vantage and ClassiPress themes
The site logo does not display on mobile view for Vantage and ClassiPress themes. But it's pretty simple to fix via self-made child theme.
If you don't have one, read how to create a Vantage child theme and ClassiPress child theme. Moreover, there is a ready-made ClassiPress child theme included in the classipress/examples/ folder
A child theme allows override parent theme templates in case the template file can be located in the child theme with the same name and related path.
So we need to copy the file nav-mobile-title-bar.php from "parts/" folder of the parent theme to the same folder of your child theme. And then, add some modifications to a new file.
In the child theme, open the new file, parts/nav-mobile-title-bar.php find the line with code:
<button class="menu-icon" type="button" data-open="offCanvasLeft"></button>Add below following line of code:
<?php if ( function_exists( 'the_custom_lo…Home page banner with video background for Vantage and HireBee themes
Home page banners for Vantage and HireBee themes designed to display an image on the background.
You just need to set the Featured Image for the Home Page.
By default it looks like this:
Default HireBee home page bannerActually, you can display a video as well, but it's not so obvious and below it will be explained how to.
While ClassiPress theme has a Customizer option to upload a video instead of image, the Vantage and HireBee still require some more actions.
We will use the Gutenberg block editor and only one "Cover" block.
Create reusable block from your existing home page contentGroup all existing blocks and add group to reusable blocks. Give it a name, for instance "Welcome banner". And remove it from the page.
Add new Cover blockCreate new a "Cover" block and upload your video file in it.
Add your …Replace the Price with Sold tag for sold ClassiPress Ads
Currently, ClassiPress theme displays a "Sold" warning on the single ad page. But it's not reflected on the ad in loops and doesn't show any warning or sold tag.
Following code snippet replaces the Price with Sold tag for ads marked sold.
ClassiPress Sold Tag exampleYou can add it in a custom plugin or child theme functions.php file or use Code Snippets plugin (more details in the instruction).
/** * Adds the ad price field in the loop before the ad title. * * For sold ads replaces price with SOLD tag. * * @return void */ function arthemes_ad_loop_price() { global $post; if ( APP_POST_TYPE !== $post->post_type ) { return; } // Display Price tag for non-sold ads. if ( 'yes' !== $post->cp_ad_sold ) { cp_ad_loop_price(); return; } ?> <div class="price-wrap sold-wrap"> <span class="tag-head"><span class="post-price"><?php esc_html_e( 'Sold', APP_TD ); ?></span></span> </div> <?php } add_action( 'ini…Disable Favorite Listings in Vantage theme
Favorite listings is the build-in feature in Vantage theme. But for some sites it is not needed.
Following PHP code snippet will disable Favorite Listings. You can add in a custom plugin or child theme functions.php file. Alternatively, Code Snippets plugin can be used (more details in the instruction).
add_filter( 'va_fave_listing_link', '__return_empty_string' ); add_filter( 'va_header_menu_primary_items_user', function( $fields ) { unset( $fields['favorites'] ); return $fields; } );Customize AppThemes Importer
The AppThemes themes provided with a built-in listing importer, which allows importing new listings using CSV spreadsheets.
Currently, following themes support the AppThemes Importer feature: ClassiPress, Vantage, Clipper and JobRoller.
Listings can be imported with title, description, excerpt, status, author, date, slug, attachments, Geo data (if theme supports), custom fields, taxonomy terms and even taxonomy meta.
Each theme configures the Importer with a list of fields it should process. Site owners can check out this list by downloading sample CSV file and add their listings for import by adding data in appropriate spreadsheet columns.
The only issue is that site owners can't just add few more columns in a listings table and expect that the Importer will add this data to new listings.
The Importer doesn't understand where to add this new data, such as custom fields, taxonomy terms or post core fields.
Hooks Inven…Create a dedicated custom field for embedding media in the Vantage theme
In most cases, site owners do not mind users placing embedded video in the listing description section. And it works in Vantage without hassle. But sometimes they want to have a dedicated area for embedded media. What is possible, but requires some explanations.
The Vantage theme allows embedding videos in the listing description, but other fields do not recognize embedding and display the plain link to the video.However, there is a workaround that allows to display embedded videos in a dedicated area.
Create a dedicated field for embedding mediaOpen Vantage → Forms → Listings and add new "File Upload" field. Add the name. Set "File Limit" to 0 (what means no file upload allowed) and "Embed Limit" to 1 or more (depending on how many embeds allowed for this field). Save and remember the field meta name: in example we've got "app_youtube".
Edit listing and embed an example YouTube video to…Toggle fields group on the ClassiPress listing form
This mod can be useful if your ClassiPress listing form has too many fields and you want to toggle fields group visibility via button or a link.
Toggle visibility for a fields groupEspecially, this important for mobile devices, where the long forms look complex and boring for your ad authors.
There are only two steps to implement this mod on your ClassiPress site.
1. Select which fields you want to toggle.Use ClassiPress form builder and move all these fields below the listing Description field. The Description field will be the last field to be shown on page load. All fields below will be hidden until user clicked the Toggle link.
2. Add JavaScript snippet on your page.Add the following code in your theme JavaScript scripts file.
jQuery( function( $ ) { $( 'form.form_step #list_post_content' ).each( function() { var collapsed = $( this ).nextUntil( '.ad-details-images-sep', '.form-field' ); if ( collapsed.le…