Joomla PHP code - php

I'm new in using Joomla and i need your help please.
I'm newly working in a company. The company bought a web shop from other company and the web shop is live now.
One button in one of the pages is responsible to place an order and the action for this button is to send an email with all the data about the orders to my company.
Now my task is to develop an API which does the following:
when clicking on that button the information should be handles in certain way and sent to other system which our company have and this system is used by my company to handle the different orders.
My problem is that i can't find the php page that contains the code which is creating these orders email in order to change it.
Is there is any tool or plugin which might help or do you have any idea how to handle this situation?
Hint: I'm not able to get any support from the company who programmed the web shop

It is very hard to tell you what to do when we don't even know which Joomla e-commerce extension you are using. Nevertheless, there are things that you can do to find out which file is doing the actual processing of the order.
However, before even doing that, you will need to define what "order processing" means. Is it when the order is saved to the database? Is it when the order is approved by the payment gateway?
In the first case, you will need to look up for code saving the data to the database (which is likely in the models folder of the extension - it might also be in the controllers), in the latter case, you will need to look up for the code processing the payment (which is likely in the controllers folder or the helpers folder).
Note that some "advanced" e-commerce extensions trigger events when an order is processed that you can use in a plugin in order to do what you want.

Related

Upload files to orders backend in woocomerce

I have been searching for a solution to allow me to upload files via the order page backend
we do artwork for most of our orders and would like to be able to manually add the file into the already processing orders backend, this is mainly for our purposes when printing jobsheets etc, but if the customer has an account be handy for them to access it to (but not to important)
i have searched for plugins but all seem to be for frontend rather than backend.
only way i think could be done is via custom field which i have tried but failed
im new to this site so i hope this question is allowed sorry if it is not
Tried implementing via custom field backend but did not work

Is it possible for a Joomla Form plugin to create a table and save form data to that table?

I am working on creating a Joomla based web service that is easy to use. The end goal is to allow customers the ability to manage the site from the front-end with no back-end (administrator) access. To accomplish this task I am using K2 that has existing front-end editing. Then behind the scenes we will provide technical support. Essentially, non-techy customers can easily manage their site, with us managing the tech side of things.
I need to provide a few forms (Contact, Event registration/payment and Donation payment). These forms also require that certain aspects of the forms can be updated via the front-end leveraging K2. (eg. The email address to send form submissions to.) With most forms components this can be done easily from the admin panel, however this is too complicated for non-techy customers and means we would have to provide admin access instead of just front-end. Not a good solution.
I have created a K2 contact Form plugin that will allow a customer to update where the email is sent on submission, when logged into the front-end with correct permissions. So far so good. I chose a plugin to accomplish this so we could leverage the existing front-end editing.
The issue I ran into is how to make my plugin create a table, preferably on install, as well as save form data to that table on successful submission. I'm not sure that this is possible using a plugin and have not found any documentation or sources mentioning how to accomplish this task.
I was hoping someone may be able to confirm either way if this is possible? Any suggestions, comments, etc would be greatly appreciated.
While installing plugin you can create DB tables, Its not a big deal create the SQL file with proper table query and set that inside your XML file.
Also you can create a forms(with many fields) inside your plugin file, But the problem is you should have any components controller and model related to this form submission task. Bcoz form submission you cannot handle inside plugin file, it should required a controller and model files.
So basically your plugin have related components then you can achieve it with form action like below.
<form action="index.php?option=com_yourcomponent&task=your_controller.your_function">
For creating DB table while installing plugin check this link
Hope its helps..

Disable One-Page Checkout in OpenCart

How can I disable OnePage Checkout in OpenCart?
Version 1.5.x comes with it in the default template and I would rather not use it as we want to have step by step pages and not use Ajax (speed/page views and process serves our needs better) for our customers.
It is possible to remove the one-page setup, but you'll have to do a very good work on the template (the checkout folder contains all steps). You will need personalized controllers as well. The built-in checkout page uses jQuery and Ajax to gathering all the information necessary in only one page, to send everything together when the customer clicks "confirm".
Once you don't want to use ajax, you will have to send the information from one page to the next using post requests, putting then in hidden <input>'s and/or in $_SESSION variable. Anyway, you will have some problems with the countries and locations, since OpenCart retrieves then via ajax.
Actually, some time ago I've found some templates on ThemeForest and other sites that implemented what you want, but I don't know if they are available anymore.
I would actually recommend you use something like Uber Checkout which while its still a short checkout process, is better visually as you don't have the panels that are standard in 1.5.X. If you're wanting to completely rewrite it to work like the old checkout system, well in theory it's already there, you just need to rewrite the controllers for the various steps to output full pages rather than JSON and put in validations through each step to make sure previous steps have been completed

creating a site which needs to communicate with magento database

I am currently working on (a part of) a site where people buy an item from a magento based e-commerce website. However, to use that item, they need to go to another website. Basically that "other" website is what I am working on (and doing it via codeigniter)
I dont know much about magento. the only information my website needs from the magento website is some information regarding products (id, name and status). This information will be linked to other tables, i.e the product ID may be a foreign key in a table in my database. I did a little research and was able to figure out how data is stored in the magento database.
Both websites will be on same server.
Now I have two options which I could think of to get products from the magento website into my website,
first is that I create insert,update and delete triggers for the required tables in the magento website so that when a product is added, modified or deleted, it first tries to do the same on my database, and if successful, continues to do it in the magento database.
second option is that I simply merge the two databases of my website and magento website creating a direct relation link between the tables.
Like I previously stated, I dont know much about magento. So i wanted to know which was the safer, better approach or if there was an approach I diddnt think of.
Any help would be appreciated. Thanks.
further clarification of task:
Basically there is a magento website (lets call it "WEBSITE A") which sells "products". When a person buys a "product", they are basically given a "code" for that product. To use this "code", they have to go to another website which I am building using codeigniter (lets call this "WEBSITE B").
Now as you can guess, the code needs to be used in WEBSITE B, and once used it unlocks stuff for the user based upon the product to which the code belonged.
As you can guess, this will create a lot of links between product and other stuff.
product although created in WEBSITE A , is used in WEBSITE B.
Your first option: Never duplicate data unless you can help it. Why couldn't you query the Magento database instead, since it's on the same server?
Your second option: Never merge databases that aren't related.
Both options are basically anti-patterns. What you should do is query the Magento database directly, or if you want to use the Magento helper functions, include Magento and use its API directly:
<?php
require_once 'path/to/Mage.php';
// Use Magento APIs
?>

Magento backend shipping selection

Heyhey,
I made a pretty kickass Magento 1.6 module to select a store and time to come pick stuff up at the shop, and it works fine in the front end. It doesn´t however appear in the backend, and the backend order creation system needs to have the same functionality.
How do I enable my module for backend order creation?
I'll supply any details needed!
Kind regards,
Alex
in the file:
/app/design/adminhtml/default/default/layout/sales.xml
around line 497 (on my version, which is Enterprise 1.10.0.1)
you should find
<adminhmtl_sales_order_create_index>
I strongly believe that has the information on what you want. Your module will need it's own layout xml file that references these areas to insert its own content. Then, you will need to hook into the order create event with an observer to run your own code to deal with the data. This may already be happening, as I'm not sure if the backend code creating the order is any different from the front end.
Hope this helps as a jumping off point.

Categories