Routing Quote Request to Google Sheet

  • Posts: 20
  • Thank you received: 4
  • Hikashop Business
2 weeks 1 day ago #372200

-- HikaShop version -- : 6.4.1
-- Joomla version -- : 6.1.0
-- PHP version -- : 8.3
-- Error-message(debug-mod must be tuned on) -- : No error message, but Email issue.

Thank you for your time!

My client is having trouble receiving email notices when someone requests a quote. Since I have no control over that, I'd like to route quote requests to a Google Sheet. Please see details below.

Customers add products to the "Quote Cart" and submit a quote request, which creates an order in the HikaShop backend. There is no pricing, tax, shipping, or payment involved on the customer-facing side.

Our goal is to automatically log each new quote request (order) to a Google Sheet, similar to how the RSForms Google Sheets plugin works for contact form submissions. We already have a Google Cloud project with the Sheets API enabled and OAuth 2.0 credentials in place.

Questions:

Does HikaShop Business offer a native plugin or integration for logging orders/quote requests to Google Sheets?

If not, is there an officially recommended third-party plugin or approach you support?

Are there any HikaShop events (such as onAfterOrderCreate) that a custom Joomla plugin could reliably hook into for this purpose on Joomla 6?

Please Log in or Create an account to join the conversation.

  • Posts: 85783
  • Thank you received: 14073
  • MODERATOR
2 weeks 1 day ago #372203

Hi,

Thanks for the detailed write-up.

1) No, HikaShop has no native Google Sheets connector, and we don't bundle or officially resell a third-party one for it.

2) You don't actually need a third-party plugin. HikaShop Business already has what you need in the Mass actions feature (System > Mass actions). Create a mass action with:

- Trigger: "After an order is created" (or "After an order is confirmed" if you only want submitted quotes).
- Action: "Send HTTP request", which lets you POST the order data to any URL, with your own headers and a body where you can inject fields with placeholders like {order_id}, {order_number}, etc.

The simplest sink for the Sheet is a Google Apps Script Web App: deploy a small script with a doPost(e) that calls sheet.appendRow(...), and point the mass action's HTTP request at its /exec URL. That avoids juggling OAuth tokens on the Joomla side, since the script writes to the Sheet under its own account.

If you prefer to hit the Sheets API directly (spreadsheets.values.append), the "Send HTTP request" action also has a built-in OAuth2 mode (token URL, token request body, token extraction) so it can fetch a bearer token before the call. The Apps Script route is just less work in practice.

There is also a "Run PHP code" action in the same mass action if you want to call the Sheets API straight from PHP using the credentials you already set up.

3) Yes. The reliable hook is onAfterOrderCreate, in a plugin of the "hikashop" group:

public function onAfterOrderCreate(&$order, &$send_email) { ... }

It fires for every new order, including quote requests, since those go through the same order-save path. onAfterOrderUpdate(&$order, &$send_email) is the matching hook for later status changes. This is exactly the event the Mass actions order plugin uses internally, so whichever route you pick (no-code mass action or your own plugin), you are hooking the same point.

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum