Product admin and edit implementations for the WLTDO framework.

Overview

Woo Let The Devs Out | Product Admin Module

Codacy Security Scan PHP Composer

To be used either as a standalone module or library, or as part of the WLTDO framework, this module intends to automate and ease the process of customizing WC product edit pages.

Initially, classes will take care of everything as you add new tabs and panels to product meta within the edit pages. Additionally, we are developing classes to manage and alter existent tabs and fields.

Install

The easier way of using this package is by requiring it using Composer.

Usage

In the plugin's main file, use the classes and autoload them with Composer.

use Wooletthedevsout\Product\Admin\{Tabs, Panels};
require __DIR__ . '/vendor/autoload.php';

$tabs = new Tabs('New Tab', $fields);

The class Tabs needs two parameters: the first is the name (not the slug) of the new tab, and the second an array of fields to be added. The array admits any number of fields, each one of them as a new array.

// Once the tab is created, we need to inject the panels dependency, using the method getPanel()

$tabs->getPanel();

// Also, a title can be added if you want so

$tabs->addTitle('The title');

Ok, what about the fields?

Ohh... of course. As shown, the fields and firstly passed to the Tabs instance as an array. For this moment, we cover all field types with native support by Woocommerce: text, number, textarea, checkbox, select, radio (needs a CSS fix, as the WC native function is defective for the product edit area).

So, we need an array of arrays. Each element is a field, and for each of these, the first element will be the field type:

*** [{{FIELD TYPE}}, {{SLUG}}, {{LABEL}}, {{DESCRIPTION}}] ***

For the select type, an additional element (another array) will include the options to be added. The same happens for the radio field, although for this latter we just cut the description, as it generates a lot of bugs within the backend. So, for the SELECT field and the RADIO field, respectivelly, we need to register like this:

*** [{{FIELD TYPE}}, {{SLUG}}, {{LABEL}}, {{DESCRIPTION}}, {{ARRAY OF OPTIONS}}] *** *** [{{FIELD TYPE}}, {{SLUG}}, {{LABEL}}, {{ARRAY OF OPTIONS}}] ***

Thus, imagine that we want two text fields, one checkbox, one select field and one radio, considering the previous code. The array to be passed would look like this:

$forms = [
	[
		'text',
		'user_message', 
		'Cool Label', 
		'Description for the tooltip with question mark.'
	],
	[
		'text', 
		'capacity', 
		'Another Label', 
		'Description for the tooltip with question mark.'
	],
	[
		'checkbox', 
		'confirm', 
		'Confirmation', 
		'Description for the tooltip with question mark.'
	],
	[
		'select', 
		'choices', 
		'Select Title', 
		'Description for the tooltip with question mark.',
		[
			'Choice 1',
			'Choice 2',
			'Choice 3'
		]
	],
	[
		'radio', 
		'choices', 
		'Select Title',
		[
			'Choice 1',
			'Choice 2'
		]
	];

FAQ

Well, this is one of the first libraries and modules for the new Woo Let The Devs Out framework. So I imagine you guys have a lot of questions. Let's try to answer some of them.

Do I need to use hooks or further implementation in order to save the meta of these new fields?

No, the Panels class is already equipped with the methods to do so.

What about validating fields?

Honestly? We are working at... we are not pretty satisfied with WC's native validation, so we should eventually come up with something more sophisticated.

Can we expect new field type (especially those not covered by the WC native API, like datetime, image, etc)?

Definitely, the point with the WLTDO framework is to provide, ultimately, an easy and OO way of extending Woocommerce. Although some implementations and extensions for WC are really well-developed, like those for payment gateways, when developing complex integrations and entire packages, they require us to be really repetitive.

You might also like...
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.
👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.

👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.

An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel, Bootstrap, and Vue.js
An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel, Bootstrap, and Vue.js

Laravel Soundboard An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel 5.8, Bootstrap 4, Vue.js, Boot

Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5
Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5

Volt Dashboard Laravel Free Frontend Web App for Laravel with Livewire & Alpine.js Never start a development project from scratch again. We've partner

Customize Login and Register Page for User/Admin in Laravel v8

Customize Login and Register Page for User/Admin in Laravel v8

A Laravel Admin Starter project with Page Builder, Roles, Impersonation, Analytics, Blog, News, Banners, FAQ, Testimonials and more

Laravel CMS Starter Project A Laravel CMS Starter project with AdminLTE theme and core features. Preview project here User: [email protected]

A convenient helper for using the laravel-seo package with Filament Admin and Forms
A convenient helper for using the laravel-seo package with Filament Admin and Forms

Combine the power of Laravel SEO and Filament PHP. This package is a convenient helper for using the laravel-seo package with Filament Admin and Forms

Admin user, role and permission management for Laravel Filament
Admin user, role and permission management for Laravel Filament

Filament Access Control Opinionated setup for managing admin users, roles and permissions within Laravel Filament Features Separate database table for

Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable.

Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable. the datatable is created with laravel & ajax so No need to install another package, yout can do search, sort, paginate and show records per page fastly.

Releases(v1.0.0)
Owner
null
Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard

Laravel Seo Tools Laravel is becoming more and more popular and lots of web application are developing. In most of the web application there need some

Tuhin Bepari 130 Dec 23, 2022
Admin Order Product Links

JBrada/AdminOrderProductLinks A simple module adds a navigation link between order, shipment, invoice and credit memo items and its related products.

Jiří Brada 0 Apr 17, 2022
Project with laravel 9 and livewire login and register + edit user profile

Laravel 9 has just been released, and I decided to make a prototype project with Laravel 9 + livewire. In this project, full user registration with mobile number along with profile editing has been implemented. Project features are as follows

ali ahmadi 5 Nov 14, 2022
Package for Laravel that gives artisan commands to setup and edit environment files.

Setup and work with .env files in Laravel from the command line NOTE: This doesn't work with Laravel 5 since .env files were changed. This is for Lara

Matt Brunt 6 Dec 17, 2022
A simple blog app where a user can signup , login, like a post , delete a post , edit a post. The app is built using laravel , tailwind css and postgres

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Nahom_zd 1 Mar 6, 2022
undefined is an issue tracking product that allows agile project management.

undefined is an issue tracking product that allows agile project management. Our goal is to make work life simpler, more efficient and stress-free. In

Osvaldas Ulevičius 3 Jun 27, 2021
If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

hirwa-products-plugin If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

NIYIBIZI HIRWA 1 Aug 23, 2022
A mostly useless package to display framework versions at the bottom of the Admin navigation panel.

A mostly useless package to display framework versions at the bottom of the Filament Admin navigation panel and an optional widget to do the same in the dashboard or custom pages.

Adam Weston 10 Nov 8, 2022
Simple project to send bulk comma-separated emails using laravel and messenger module from quick admin panel generator.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Novath Thomas 1 Dec 1, 2021
Fully customizable and tests supported Laravel admin dashboard for developers.

Laravel Admin dashboard Like Laravel Jetstream but built with Hotwire Turbo + additional perks. Tools used: tailwindcomponents/dashboard Hotwire Turbo

null 12 Nov 1, 2022