Send orders from OpenCart to WooCommerce - php

I am having very specific task that needs to be implemented. I have to import specific orders from one OpenCart shop to another WooCommerce shop. The reason we're doing this is because in the woocommerce shop there are some functionalities that we don't want to implement on the OC and we just want to use the WooCommerce.
One of the options i thought about was to get the orders from the database directly / they are using the same server so that's easy to access /, but I run into an issue trying to pass the Shipping method ( because it comes from the checkout and shows a form in the backend that we need ).
So I am thinking of another way to simulate the process through the WooCommerce REST API, but I am not sure from where to start.. Have someone worked on similar thing, I would appreciate if I get some guidance.
Thanks in advance!!

Related

Updating WooCommerce products by php

I have an e-commerce store made with WooCommerce. In my store I have implemented a plugin, which allow users to subscribe to prices of specific products. This plugin informs the user only about a price change via email, when I manually change the price and save the product. This works perfect.
So far so good, the only problem is that I don´t change the prices manually, because they´re generated automatically by another plugin.
My goal is now to just save every product of my store every hour by a php-script and a cronjob. How to set up a cronjob is not the problem, but I don´t know the php-script.
All in all the php-script only has to be able to go into every product and just save it.
Because I´m new to WordPress and PHP, I don´t have any clue.
Thank you very much for helping out!

Magento Multi-Step Product Configuration

I'm currently attempting to extend the inherent Magento product view to divide the custom options belonging to a configurable product into sections loaded by ajax. The end goal is to create a step by step process guiding the user through each step of the product configuration process before they would add the product to the cart.
Advanced Custom Product Options
We are also utilizing Mageworx's Advanced Custom Product Options to allow for the larger customization of products.
Simple Products Linked to Configurable
Our current environment is set up to handle simple products as configurators for their parent configurable product. When a user navigates to the simple product, they are directed to the configurable product with the option represented by the simple product pre-selected.
End Goal
The hopeful endpoint would be that once a user clicks on a simple product, they would be redirected to the configurable product with a single pre-selected option depending on the simple product. The user would then be able to customize their order, or jump directly to adding it to the cart as is. The customization process would re-evaluate at each step to determine if there is a concurrent step, for example, if the user were to select to add trim, there would be an additional step to customize that trim, whereas if they opted out, the step would be skipped.
The idea is simply a product configurator within the Magento framework, something similar, in function, as to what appears below. The checkout steps being Style, Color, and Size, each which have their own page.
The Overarching Question
I am fairly new to the development of Magento, and am wondering what the best method of attacking this problem is. I have thought of using an observer to hook into before add to cart, but I am unsure it would allow me to refresh the blocks and load in new data. My other idea was to tap into view.phtml and set up some ajax loading within the page itself, but that seemed a bit 'hacky'.
I have spent quite a while searching for examples on how some have overcome this problems, but haven't found much outside of some very vague ideas on what could work. If any one has insight onto a solution to my problem, their thoughts would be much appreciated.
Current Approach
So far I've tried creating a Router for a Controller to handle POST requests to change out the Product Option sidebar when a value is changed. It seems a little bit slow, however.

Magento Customization Issues

I am building a custom tool where the user can play around with the product (customize parts and add colors) and then go ahead and buy. I have so far built this in PHP but would like to integrate it with my Magento store. Is there a way I can connect this to Magento so that the product can be passed through Add to Cart etc?
Thanks.
Magento already has a support for this.
Check the configurable products, or the Custom options tab in the product admin edit page. You can also use bundle products.
If none of these fit your needs then you may want to rephrase your question and explain what exactly do you need.

How to link into a cart outside of magento that was built with the cart api's

I am building a custom front end to Magento, where users selects the products they want to purchase outside of Magento. But then use Magento for the rest.
I already use the product api's to pull the product_id/sku/name/price out. So I have a list of product_id’s ready for purchase.
I will use the api's for creating and building a shopping cart.
My question is…
Once I populate a shopping cart using the apis and have the shoppingcart_id, how do I redirect the user directly into that shopping cart page in Magento?
Thanks for any help or suggestions.
Redirecting is easy. This is how you can do it in Magento 1.5. Note that you need to be running within a controller action in order for this to work properly.
$this->_redirect('checkout/cart');
If you want to direct the user to the checkout page, try something like the following:
$this->_redirect('checkout/onepage/');
Hope this helps!

Adding item to cart via API with CS-Cart

I am building a web application which allows visitors of a site to custom-build a product, and then add that custom-built item to their shopping cart in order to purchase it. For instance, I might build a car with the following customizations:
Alloy wheels
Leather seats
Red
I've searched around looking for a solution to my problem, but have yet to come across anything very helpful. I am using CS-Cart as my shopping cart solution.
What I need to know is how I might programmatically add this custom-built item to a user's shopping cart. Does CS-Cart provide an API for doing something like this? If not, does anyone have any suggestions on how I might achieve my goal? I basically just need to add a generic "custom build" item to the user's cart with the customizations they made somehow attached to this item.
I've been taking a look at CS-Cart and this question came up.
From reading through the CS-Cart API documentation, it looks like CS-Cart's API is more of a plugin framework than an actual web service. In other words, I believe you can write code to modify CS-Cart (or programmatically update shopping cart items) but this code needs to be written as a plugin into CS-Cart rather than simply as an API call from your third-party webapp.
So I think you have two solutions:
Build a CS-Cart plugin which has a mini-API to take your custom item from your webapp and add it into the shopping cart through CS-Cart
If you literally just need to add the item into the shopping cart, and your webapp and CS-Cart are on the same server, you may be able to skirt around CS-Cart and get your webapp to literally just add the item into CS-Cart's shopping cart PHP session
I hope this helps - I'm not mega-familiar with CS-Cart so if there are any factual errors in this I apologise.

Categories