Okay
  Public Ticket #3055786
Integration with Woocommerce
Closed

Comments

  •  2
    Juan started the conversation

    Hello. 

    We are selling vouchers in Woocommerce. Each of those vouchers have an unique number/code. 

    When a users make a purchase in woocommerce he receive a pdf voucher via email.

    We want that the user will be able to use this voucher number/code to make an appointment using the Amalia reservation system.

    Can we set up the reservation system to accept thoses vouchers code? 

  •  9
    Tyler Yanta replied

    Interesting idea. Following. 

  •  1,688
    Miloš replied

    Hi, Juan and Tyler

    Thank you for this question, to be honest, i personally like this idea as well.

    -

    In my opinion, i don't see a reason why this should not work.

    If i understand, you already have the WooCommerce side of things figured out - They can receive a coupon code in the Email, right?

    -

    Let's say you set the same coupon code in Amelia, waiting to be used for specific services.

    Here on our Demo, i will take this service, Hatha Yoga, and i create a 50%coupon code for that service ( or multiple services)

    5715025945.png
    5453081098.png

    Now, if i book a Hatha Yoga appointment, i can simply type in ( or paste)  the code that my customer already got from the WooCommerce email, in the Coupon field, and it will be applied to the price :

    3785850484.png

    Let me know how that sounds, and if i correctly understood the idea and the goal.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Juan replied

    Hi Milos

    I already thought about that solution. The problem here is that I will have to manually crate a Code in Amelia as soon I sell a voucher so it will be available in the booking system.

    What do you think about this new idea:

    Generate big amount of codes and import them in Amelia. I know that officially I only can add codes in a manually way, but I read in the forum that it’s possible via data base so it will work for me.

    Then the same list of codes I will Import into the voucher woocommerce plugin and only sell them in stead of auto-generated codes. 

    Then, every time I sell a voucher I’m sure that this code is already set up in Amelia waiting to be use. 

    I think it may work. 

    What do you think?

  •  1,688
    Miloš replied

    Hi, Juan 

    That is a great idea, i must say.

    And i found confirmation from my colleague, he advised another user, who made SQL Queries to update the tables in the database.

    I don't know which SQL Query exactly the user used, and creating Queries does not fall under what our support covers, 

    but they definitely reported success, and imported a very large number of generated coupon codes into the database through SQL Queries.

    There is no limit on the number of loaded coupons in Amelia, but you need to add them either manually through the WP backend or through the database.  ( I think it should be also possible to import a CSV into the tables, as well, through database manager, such as PhPMyAdmin, but didn't test that yet. )

     You will need these tables:

    4189208280.jpg

    So, it is absolutely possible.smile.png Let me know if you try this, and how it goes.

    Let me know if you have any questions.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Diane replied

    Hi there - where can these databases be found? From my research it appears that Amelia pulls the coupon codes from their server directly.

  •  1,688
    Miloš replied

    Hi, Diane 

    When you install Amelia on your WordPress site,

    we don't store any data on our servers.

    -

    During the installation, Amelia creates its tables directly on your WordPress database.

    Your WordPress database is being stored on the server of your WordPress hosting.

    If you need help to access it,

    you can ask your hosting either what is the URL with credentials to access PHPMyAdmin of the hosting WordPress database,

    or you can also access through the hosting's cPanel.

    It is also important to find what is your WordPress database table prefix.

    Default prefix is wp_  , but it can be anything, it depends on the site/server.

    If you need more information about how Databases and WordPress works, please check out this page :

    Beginner’s Guide to WordPress Database Management with phpMyAdmin

    -

    And as i mentioned before, here is the screenshot of the tables where Amelia stores the coupon information :

    4189208280.jpg

    Table names are :

    wp_amelia_coupons

    wp_amelia_coupons_to_events

    wp_amelia_coupons_to_services

    -

    wp_prefix is the default WordPress database table prefix, but it can be different on your site/server.

    You can find more details about that in the Guide i posted earlier.

    Thank you

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Diane replied

    Thanks so much for your reply Milos!

    Can I just ask, is there a way to find the coupons used on PHPmyadmin? so as to create and export a report on the appointments using a coupon.

    Thanks!

  •  1,688
    Miloš replied

    Hi, Diane

    Apologies for a late reply.

    We had a break during our National Holiday , which additionally slowed our response time.

    -

    I have experimented a bit with SQL Queries on my local Test site, in the PHPMyAdmin.

    This does not fall under our support, but i like to do extra effort to see if i can come up with some example for you.

    As mentioned before, there are several Amelia tables that hold the coupon informations.

    wp_amelia_coupons

    wp_amelia_coupons_to_events

    wp_amelia_coupons_to_services

    But there is also this table  wp_amelia_customer_bookings , which holds some useful details as well.

    Now, depending on your knowledge with SQL, you might be able to use JOINs in the Query in order to combine data from multiple tables, and add a WHERE statement to check which coupon ID matches with an appointment ID, or Event ID, etc,

    but i will give you a basic example.

    I just booked an Event with my customer and used the latest coupon. Since i have five coupons, this coupon ID will be 5.

    In this table wp_amelia_customer_bookings , there is a column "appointment ID" , but for Events, it will  just have a NULL row.

    If this was an appointment booking, it would store the actual appointment ID in this table.

    2053403916.png

    On my example, i will just do a simple Query to pull all data from that table :

    SELECT * FROM `wp_amelia_customer_bookings` ORDER BY `wp_amelia_customer_bookings`.`created` DESC

    This means we are pulling all columns from wp_amelia_customer_bookings table,  and we will sort it by the date of when the booking happened in descending order ( newest bookings first).

    And we can export this as a CSV as a report.

    8707294210.png
    5400109909.png
    2902644352.png

    Of course, you can go in the PHPMyAdmin and click on the other relevant tables that hold coupon data,

    and each time you load a table, you will see an SQL Query preview additionally,

    so you can try to experiment and try to achieve a Query that will provide the details you need.

    That is the best we can do, as our support does not provide writing or debugging SQL Queries for users,

    and we will do our best to add a better user-friendly way to make reports that provide more details on coupon usage.

    -

    Other than that, you will see built-in Export options in the Amelia Finance section, for both "Payments" and "Coupons" tab.

    But we don't have a column for "coupon used" in these export options yet.

    5851212228.png

    6570340364.png

    If you have any improvement ideas about this and any other suggestions,

    you can add suggestions for our developers.

    Please feel free to search through our feature suggestion page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like, where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Diane replied

    Thanks so much Milos, you've been very very helpful! I would definitely recommend that the coupon code is added to the list of exportable data for the appointments.

  •   Miloš replied privately