GithubHelp home page GithubHelp logo

lightspeedwp / lsx-business-directory Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 0.0 7.72 MB

LSX Business Directory plugin helps you build a directory of business listings on your WordPress website using the LSX Theme and extensions.

Home Page: https://lsdev.biz/lsx/extensions/business-directory/

License: GNU General Public License v3.0

CSS 12.96% JavaScript 5.13% Shell 0.02% PHP 70.97% SCSS 10.91%
wordpress-plugin business-directory lsx-theme wordpress-website

lsx-business-directory's Introduction

LSX Business Directory

LSX Business Directory

Made for LSX Made for Woocommerce license Built gulp.js

Code Climate Scrutinizer


This plugin allows you to add a business directory listings to your WordPress website using the LSX Theme and extensions.

Features include:

  • Category and location filters on the listing archive page (requires FacetWP and LSX Search plugins)
  • Set a banner image for each listing
  • Configure contact form for individual listings
  • Compact contact details card with logo
  • HTML enabled description field for business description

The LSX Business Directory is a fully Gutenberg compatible WordPress plugin, powered by the latest software.

Works with the LSX Theme

The LSX Business Directory is designed for LSX Theme, improving internal linking, website SEO and user experience!

Getting started with LSX Business Directory

  • Login to the backend of your Wordpress website.
  • Navigate to the "Plugins" item in your dashboard.
  • Select "Add New".
  • Search for "LSX Business Directory" in the plugin search bar.
  • Once you see the LSX Business Directory plugin, select "Install".
  • Activate the plugin.
  • That's it!

Documentation

LSX Business Directory Documentation has everything you need to use the plugin.

Support

Contact the LightSpeed for assistance via the LSX support form.

Before logging a ticket with support, please make sure you have the latest version of WordPress installed.

Your WordPress website needs to be running PHP version 7.0 or higher in order to make use of the LSX Business Directory plugin.

If you still require help with the LSX Business Directory Plugin, please log any bug issues you are having on the Github Issues page, or send an email to [email protected].

Contributing to the LSX Business Directory plugin

If you're a developer who's spotted a bug issue and have a fix, or simply have functionality you think would extend our core plugin, we are always happy to accept your contribution! Visit the LSX Business Directory Plugin on Github and submit a Pull Request with your updates.


Work with us at LightSpeed

Copyright © 2020 LightSpeed WordPress Development. All Rights Reserved.

LightSpeed's Company Website  ·  LSX Product Website

GitHub  ·  Facebook  ·  Twitter

lsx-business-directory's People

Contributors

ashleyshaw avatar davidcramer avatar dependabot-preview[bot] avatar dependabot[bot] avatar eleshar avatar garthglaum avatar imgbotapp avatar josephlightspeed avatar krugazul avatar mergify[bot] avatar nandotess avatar rafisegerman avatar thebeard avatar viscosho avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lsx-business-directory's Issues

Verify the single template works, and pull through the new custom fields

You will need to make sure the name and slug changes you did for the initial build are working. And then please take a look at the design and pull through the custom fields to the frontend. As well as the other information.

Single Design

  • All custom fields to be filled in, and pulled through to the frontend
  • One business should be added with just a title and description, so we can see how the page reacts to the empty elements.

Services - Checkout - Success / Fail

Order Complete

If the payment is successful then we need to display a link to the newly added Business.
As well as links to manage your business.

Order Failed

We need to inform the customer that their listing has been created and will only be published once payment is complete.

Design

Screenshot 2020-04-03 at 13 59 09

Translations

Screenshot 2020-04-03 at 13 59 52

Create a new plugin setting box for the post type archive settings

Create a new settings panel which will house the following fields. The bold titles can be headings if possible. But i think adding a "title" create a new box. In that case do 2 boxes. Because the search settings should not show if LSX Search is disabled.

General

  • Layout option (radio buttons Grid vs List)

*Business Directory - Search

  • Enable Search (checkbox)
  • Layout (select)
  • Collapse (checkbox)
  • Disable Sorting (checkbox)
  • Disable the date option (checkbox)
  • Display Result Count (checkbox)
  • Display Clear Button (checkbox)
  • All the Facets listed as checkboxes. (Could we make this group sortable?)

The industries nav shortcode segments the listing in several divs

Describe the bug

The industries nav shortcode segments the listing in several divs, this causes that the lists are split on 3 or 3 lists and then on mobile and tablets is not looking good and is hard to style.

It should be just one wrapper row row-flex div with all of the btn-wrap items inside.

Steps to Reproduce

  1. Go to a listing archive page.
  2. Make sure the industries nav shortcode is on.
  3. Inspect the nav.
  4. See error

Expected behavior

It should be just one wrapper row row-flex div with all of the btn-wrap items inside.

Screenshots

The HTML
Screen Shot 2020-04-09 at 10 18 39 AM

The 3 sections
Screen Shot 2020-04-09 at 10 18 33 AM

The issue on mobile
Screen Shot 2020-04-09 at 10 22 47 AM

Menu Styles are being overridden

Describe the bug

The menu links styles are being overridden by the gutenberg.css in the theme.

Expected behavior

It should inherit the link colour set in the backend.

Screenshots

Screenshot 2021-03-19 at 13 34 45

Additional context

Check the LSX Customizer and see if it is on the latest version first.

The listing shortcode and list should have the option to show excerpts

Is your enhancement related to a problem? Please describe.

The plugin design has the grid option without excerpt (https://projects.invisionapp.com/d/main#/console/19153622/403917535/preview) but some clients designs have the shortcode grid with excerpts, so the shortcode should have the option to show or hide the excerpt (https://projects.invisionapp.com/d/main#/console/18681590/391089248/preview)

Describe the solution you'd like

The shortcode [lsx_bd_recent_listings] should have an option like excerpt=true

Designs

https://projects.invisionapp.com/d/main#/console/18681590/391089248/preview

Create an add / edit business form under the My Account menu

Requirements

We need to be able to add or edit a business from the frontend of the site.

Description of the Change

Add a new tab to the WooCommerce My Account menu, this tab will house the form which you use to either edit or add a new business.

Resources

  • A good example of frontend management of content is the community events plugin.
  • Invision Design

Checklist

  • Adding a new business should save all the fields available.
  • Editing a current business should save all the fields available.
  • Any required fields should fail and show an error message if not filled in.
  • Once successful you should be redirected back to the My Listings page with a message along the lines of "Save Successful", in green WooCommerce notice styling.
  • The page should look like the design.

Design

screencapture-projects-invisionapp-d-main-2020-02-26-06_31_07

Banners generated by this plugin are using block classes

Describe the bug

Banners generated by this plugin are using block classes.

  • For most banners for dynamic pages the html use is from a block, this should not be like this, it should use LSX classes, block classes do not work outside a block.
    They are coming from the do_banner function on this plugin.
    Please change the structure to be like an LSX default banner with LSX classes.

Expected behavior

Banners autogenerated by the plugin should use LSX classes.

Screenshots

Screen Shot 2020-03-31 at 11 20 45 AM

We need some placeholder settings for the listing images (feature + banner)

Requirements

  • We need placeholder settings for the images that show on the LSX BD pages.
  • If there is no placeholder image, then do not use it.

Archive Settings Tabs

  • Disable banners
  • Banner Placeholder
  • Featured Image Placeholder

Single Settings Tabs

  • Banner Placeholder - Upload a banner placeholder which will show on.
  • Logo Placeholder

Include the CMB2 as a vendor and register the custom fields

Please include the CMB2 as a vendor and register the custom fields for the business directory post type.

Images

  • Featured Image = Logo
  • Banner Image = Directory Banner
  • Banner Colour = Default Colour if no banner

Custom Fields
Branches (repeatable group)

  • Name
  • Telephone
  • Email
  • Website
  • Google Place Search.

Address

  • Google Maps Search
  • Complex Name / Business Park / Street Number
  • Street Name
  • Suburb
  • City
  • Postal Code
  • State / Province
  • Country

Contact

  • Primary Email
  • Secondary Email
  • Primary Phone
  • Secondary Phone
  • Fax Number
  • Website

Create a WooCommerce My Account page to view the listings you have created

Problem

We would like the customers to be able to see the listing which they are the authors of, allowing them to link through to the edit listing page.

Solution

Register a new My Account tab based on the WooCommerce documentation. Here you will query the businesses which the current user is the "author" of.

If no businesses are present then it should show a friendly message prompting you to add a new one.

NB the "listing type" will only be introduced in Phase 4, but you will need to make sure the table can handle the introduction of new columns easily.

Designs

My Listings
My Listing - No Listing

Create a WordPress style theme for the CMB2 options page.

Requirements

We need to style the CMB2 options page in the same style as the WordPress Theme Pages. We would also like the individual boxes to act like "tabs" as the appearance page does.

All functionality needs to be contained in 1 class in lsx-business-directory/classes/admin/class-settings-theme.php, as it will need to be ported over to the LSX Health Plan plugin afterwards.

The SCSS can be in a module of its own as well, included in the admin dashboard.

Development

1:) This is only to apply to the settings page, so you need to make sure you test the to make sure the current screen is the options_page.
lsx-business-directory/vendor/CMB2/includes/CMB2.php
do_action( 'cmb2_before_form', $this->cmb_id, $object_id, $object_type, $this );
OR
do_action( "cmb2_before_{$object_type}_form_{$this->cmb_id}", $object_id, $this );

You can also test for these URL params as they are unique edit.php?post_type=business-directory&page=lsx-business-directory-settings

2:) Use the above actions to run through the fields for output, and create a tabbed navigation Div, this will containt the links to trigger the tabs. Using the appearance of the tabbed navigation.

3:) Before the "title" field type output an opening div, which will house the "tab ID", and the opening div for the tab.
Action Location - lsx-business-directory/vendor/CMB2/includes/CMB2_Field.php - 834
do_action( 'cmb2_before_field_row', $this );
OR
do_action( "cmb2_before_{$field_type}_field_row", $this );

4a:) Lastly you will need to close each of the tab content divs. The easiest way to do this is to add a custom CMB2 field, which only outputs a ` 'title_close' which you can test for.

4b:) You will need to add the title_close to the end of all the settings, to mark where you want the box to "wrap". See the locations below, where you need to add in the title_close field.

5:) You will then need to add in the CSS for the navigation links (tabs headers) and the fields.

6:) You will need to add in some JS to handle the tab switching, this can be added to the admin_head action, as just a <script> output. We do not need an entire JS file just for that.

Business directory is affecting the css of the search pages

Describe the bug

The styles for this plugin are also affecting archive and search pages that are not business directory related, for example https://lsx-business-directory.lsdev.biz/search/edit+me

Expected behavior

Any archive page or search page should have any styles or icons from the business directory.

Verify the grid and list layouts are working on the taxonomy archives

After generating the plugin you should have already renamed the templates in the plugin as well as making sure the post type archive is displaying and using the correct template. This is the same as #7

The taxonomy templates
Directory Grid Layout
Directory List Layout

Testing

  • The grid and list layout should just fill the content area if LSX search is disabled. So all the search elements should be hidden, and the banner title says Business Directory
  • The page should be able to sort and page using the facets.
  • As well as the facets working and filtering the page.
  • While on the taxonomy page, no facet should show using that taxonomy. e.g On the “Western Cape '' region archive, we don't want the “Regions” filters to show.

Even if there is no map address the map box appears in the single directory

Describe the bug

Even if there is no map address the map box appears in the single directory.
Sometimes the map box is empty, and sometimes it shows a placeholder map.

Steps to Reproduce

  1. Go to a single business listing.
  2. check if it has a map address, make sure that is does not.
  3. See the business front end single page.
  4. See error

Expected behavior

If there is no address then the map box should no appear.

Screenshots

Screen Shot 2020-04-09 at 10 12 15 AM

Create 2 new business email notifications

Problem

The user needs to be notified via email when their business has been added / edited or deleted. In future we might have several users managing a business.

Solution

Extend the WooCommerce Mails and create the 3 new classes. These will trigger when the relevant action is triggered.

Designs (to be linked)

Additional context

There is a good tutorial on creating a new custom WooCommerce Email here.

Generate a new Business Directory plugin from the LSX Starter Plugin

Create a new Branch and generate a new plugin from the LSX Starter Plugin

###Naming Conventions
Prefixes

  • lsx_business_directory_
  • lsx_bd_
  • LSX_BD_PATH
  • LSX_BD_URL
  • LSX_BD_VERSION

Namespacing

  • \lsx\business_directory\
  • \lsx\business_directory\classes
  • \lsx\business_directory\includes\functions
  • \lsx\business_directory\includes\helpers

The plugin should be able to activate with no issues. We will do the post type registering etc in another issue.

WooCommerce Subscription Actions

Subscription Actions

When the subscription status changes, we need to run a few actions to adjust the business attached to that order, this should only run on products setup as “Simple Product” or “Variable Product”
e.g /woothemes-sensei/plugins/sensei-wc-paid-courses/includes/woocommerce-integrations/class-sensei-wc-subscriptions.php

Subscription set to Active

All businesses attached to this order are set to “published”

Subscription set to oh hold

All businesses attached to this order are set to “pending”

Subscription Deleted

All businesses attached to this order are set to “trash”

Create the initial documentation based on the LSX standard

@garthglaum when the plugin is near completion could you start on the documentation for the lsdev site.

Actions available

  • Installing plugin
  • Adding a business (backend)
  • Business Listings (backend)
  • Single View
  • Adding in your Google API Key, add links to Google about activating you Google Maps JS API and your Google Maps Places API.

Listing pages need banners elements

Is your enhancement related to a problem? Please describe.

We want to be able to assign banner images to the business directory pages. But currently the pages use the classic editor, and we do not have blocks for the BD fields yet.

Describe the solution you'd like

Register Banner Fields for the following pages, they will all need the same fields.

Banner Fields

  • Image
  • Colour
  • Title
  • Subtitle
  • Disable

Pages needing banners

  • Post Type Archive
  • Taxonomy Pages
  • Single Listings
  • Search results

Designs

Single Listing
Screenshot 2020-03-12 at 12 10 50

Archives (post type archive + single listing)
Screenshot 2020-03-12 at 12 11 04

Register the post types and taxonomies

Please register the following post types and the taxonomies.

Post Type - Business Directory

  • ID = lsx-business-directory
  • Archive Slug = business-directory
  • Single Slug = businesses
  • Menu Label / Plural Label = Business Directory

Taxonomy - Industry

  • ID = lsx-bd-industry
  • Single Slug = industry/{term_name}
  • Menu Label / Single Label = Industry
  • Plural Label = Industries

Taxonomy - Region

  • ID = lsx-bd-region
  • Single Slug = region/{term_name}
  • Menu Label / Single Label = Region
  • Plural Label = Regions

Update the documentation to include the LSX Search Settings and Facet WP integration.

The documentation will need to be updated with instructions on how to set the settings. Im not what the other plugins documentation contains, but we should include links to the FacetWP documentation. So they can see how to set that up.

  • Explain what each setting will do
  • The readme will need to be updated with a link to the search section of the documentation, with a small description explaining it can be integrated with LSX Search.

WooCommerce - Services Sign Up

Buy Subscription / Add to cart

  • We need to clear the cart, before the customers product is added to the cart. Only for business subscriptions.
  • Once the product has been added to the cart we will redirect to the “Add Business” page.

Add Business

  • This will be a page which is calling the “Add Business” form function.
  • The user will have the option to skip adding a business during checkout.
  • The form will capture all of the information entered into a cookie, for use later during checkout.
  • After you have added your business, you will be redirected to checkout to complete your order.

Checkout

As normal the customer will enter their information, and have their account created if necessary, and go through payment.

We need a function to run when the order is created,

  • This will take the cookie information and create the business listing as “pending”.
  • The cookie info is then cleared.
  • And the business listing ID is stored against the Order, and vice versa.

We need a filter to run when the subscription is created,

  • Here we will attach the business ID to the subscription.
  • You will have access to the Order ID, you can get it from that.
  • Or have a class variable to capture that to use later.

We need a filter to run on when payment is complete, if it is successful then the Business Listing is set to “publish”.

  • This could also run when orders are set to “complete”
  • Or when “subscriptions” are set to “active”
  • Both of these are triggered when payment is successful

Validation

  • The user must be able to purchase a "listing" subscription, by adding it to their cart.
  • The user must be able to create a listing before checkout or have the option to skip.
  • Once the user has completed payment the listing should appear in the listing directory.
  • The user should also see the listing in their "My Account -> My Listings" page.
  • As well as be able to edit the listing.

Create a "my listings" block to show the latest businesses you are listing

Problem

The My Account page is a bit bland, and doesnt really show much.

Solution

We would like a "My Listings" block which outputs the top 5 listing you have. (or the latest 5). It will show a max of 5, and then show a link to the My Listings page.

This will need to be a WordPress Block, which is used via gutenberg.

Designs

My Listings Block

Register a settings page to house the API key and future plugin settings

We are going to use CMB2 to generate the settings page, the current Current Settings Page only allows you to select a Caldera form, to show as the single business contact.

Example of the LSX HP Settings Code

Create a settings page under the Business Directory menu in the backend, using the slug “lsx-business-directory-settings”.

  • We are only going to have 1 panel for now, with a heading of “Single”
  • The description of the panel will be “The settings for the single business directory view”

We will have 1 dropdown field with the label of “Enquiry Form”, This field will need to display a combined list of forms from the following plugins.

  • WP Forms
  • Ninja Forms
  • Gravity Forms
  • Caldera Forms
  • e.g code from Tour Operator

Verify the default and search grid and list layouts work on the post type archive

After generating the plugin you should have already renamed the templates in the plugin as well as making sure the post type archive is displaying and using the correct template.

You will need to look at the design and make sure all of the relevant fields are being called through, as well as the search filters from #6 are displaying and the options are working.

Directory Grid Layout
Directory List Layout

Testing

  • The grid and list layout should just fill the content area if LSX search is disabled. So all the search elements should be hidden, and the banner title says Business Directory
  • The page should be able to sort and page using the facets.
  • As well as the facets working and filtering the page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.