Git Product home page Git Product logo

wpclothes2order's Introduction

WPC2O


Description

Unofficial WooCommerce Plugin for Clothes2Order

Minimum Requirements

  • PHP 7.4 or greater is recommended
  • MySQL 5.7 or greater is recommended

Getting started

See our getting started guide

See changelog for all versions.

Development

We have created a test environment using Docker to allow easy & open development of this project. For more information, please see here.

Important information

Please note, this is an unoffical Clothes2Order plugin. We are no way connected to the service & provide this plugin for free. Use this plugin at your own risk. We do not provide any offical support, however if you have any issues, please open a new issue here

wpclothes2order's People

Contributors

ashleyredman avatar ashleyredman-jisc avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wpclothes2order's Issues

WP Cron - Sync local store items to C2O stock availability.

As C2O stock availability changes, we need to reach out their endpoint & re sync their stock count with local WC products.

Example:
01/01/2022 -> C2O have 5 tops, 5 trousers & 5 ties available.
02/01/2022 -> C2O have 5 tops, 4 trousers & 5 ties available.

In the example situation above, C2O have less stock so our local store must up their it's stock available to reflect this to disallow over selling items. There will always be times were the store owner will need to reconcile issues with C2O as their API is not kept up-to-date per transaction.

What needs implementing:

WP-Cron to fetch stock results & sync with local product stock availability

  • C2O only expose an endpoint to a .csv which contains their stock, this needs parsing

New group of options in the WPC2O settings screen

  • Admin can select the frequency which the plugin will fetch stock results to sync (24 hours min edit that is some time after 3:30am)

Order history: Allow user to see the full order request

Within the order history tab of the plugin options, for each order, the user should be able to toggle to see the full API request sent to Clothes2Order.

Involves:

  • Storing the full API request in the database, currently we do not save the full request, only produce a new request & send it, then mark the order as processed.
  • Adding a this field regardless of the response from C2O, even if the request fails, we still store it as this feature is mostly useful for debugging.
  • Including new UI that will allow this toggle.

Discussed in #95

Originally posted by adamcook102 December 5, 2022
Hi,

Is there somewhere to see the request response sent to Clothes 2 order? I set a product embroidery to 10cm but they have said it has been sent as 1cm. It would be good to be able to check the request sent to debug.

Also my image optimiser (shrinking) plugin may be impacting the upload so would be good to see what image was sent so I can somehow make sure its the full sized image sent.

Thanks in advance :)

Product variation cleanup

If a product variation has been given for example the term 'tops' & has a certain position selected, then if later changed to 'hats' and also has positions selected, then we need to check for old out of term positions & remove them from their meta as not to over bloat the DB.

wpc2o_update_order_notes

Discussed in #89

Originally posted by c3aus3scu November 29, 2022
Hi. After I add an product and order, after in the order info under the Customer tab, I received this error: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wpc2o_update_order_notes' not found or invalid function name in /home/daemons/public_html/wp-includes/class-wp-hook.php on line 308

Illegal string offset 'code' 'message' 'body'

Discussed in #107

Originally posted by c3aus3scu December 16, 2022
After the last update, I receive this on top of the website.

Warning: Illegal string offset 'code' in /home/daemons/public_html/wp-content/plugins/wpclothes2order/includes/wpc2o-options-orders.php on line 96

Warning: Illegal string offset 'message' in /home/daemons/public_html/wp-content/plugins/wpclothes2order/includes/wpc2o-options-orders.php on line 97

Warning: Illegal string offset 'body' in /home/daemons/public_html/wp-content/plugins/wpclothes2order/includes/wpc2o-options-orders.php on line 98

https://daemons.ro/

Logo positions, logo widths & product type logic

Different product types can accept different logo widths, for example a 'top' can have a logo placed in different locations, top back, top chest, left sleeve etc.

Based on the product & the logo location, depends on the possible widths.

Thankfully this information was used in the 0.1.0 alpha version as ACF options, so this logic needs to be encapsulated into code / constrained so only valid values are posted to the API.

Let's start by documenting the variations & have those variations visible in the plugin settings. This way these constants can be accessed & used per product.

Plugin settings menu item

As we wish to allow users to have complete control over their WPC2O API options, we require a separate settings screen that for now will take the shape of:

WP admin main menu -> WPC2O -> Options screen:

Options screen:

  • Full order history (fetched from C2O on page load, transient in place to cache this request)
  • Stock sync (Allows manual re-sync of #21
  • Select logo positions globally, i.e all checked by default, but maybe disable specific locations & default logo upload (.jpg)
  • Select logo creation type, i.e print | embroidery & default widths
  • Select delivery method, i.e standard

No WC options set admin notice

Whilst the plugin is activated, check if the the required fields of the WC plugin options are set.
If they are now, exit init of the plugin. These options are required for our plugin to work.

How to enter specific product information in order for this data to be sent via the API

Hi,

I am new to coding and don't have much php knowledge...

Through their docs I can see that in the JSON file example there is an array that contains information about the print position, width, a link for the image to be printed etc...

But I don't understand how the plugin collects all these information. I mean where should I put those information in order for the plugin to collect them and send the information through the api. Should I create new fields in product page?

C2O not receiving my orders once live

Discussed in #83

Originally posted by adamcook102 November 10, 2022
Hi,

So I have tested the app and sent in C2O test mode to C2O, however now ive been marked as live at C2O they are not receiving my order. I have unticked the test options so it should be sending to C2O. Looking at the order it sends to C2O but no response
image

image

image

UPDATE:
Speaking to C2O my order is still being sent in test mode. Can you assist? See below i dont have it set to test mode:
image

image

image

Thanks,

Adam

All `product_cat` taxonomy terms are radio buttons

Now that we have included a way to use radio buttons instead of checkboxes, there doesn't seem to be a good way to have this happen for just sub-terms of the 'clothing' term in the taxonomy.

We may have to let this slide or revert to using the wp intended way of using checkboxes.

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.