Magento cron job export / import products - php

My client has an existing Magento store online. Now, they wanna to setup another store at different region. Of course, they will have different currency, shipping method, payment method, different price and different inventory stock check.
Therefore, they required to replicate the same existing store to another folder. Now my problem is they want to have same product range available from both website. My product list is comprised of simple and configurable products only.
I need to set a cron job to export product lists in csv from website A.
And I need to set another cron job to fetch that csv file from website A to website B. However, the product list to be imported into website B should not
duplicate same record
update inventory and price value
My current setup for both website are hosted in same server.
I not sure how this can be done. Anyone can guide me. Thanks.

why do u want to set-up whole new magento store for second region.
u can use magento's multiple store. for that u don't have to import and export of product. infact u just have to create new magento store and payment methods, currency or whatever u want to change u can change those from configuration very easily, u can use differnt theme for both differnt stores also.
U can use this link as a refrence
http://www.crucialwebhost.com/kb/how-to-setup-multiple-magento-stores/

Related

Manage magento inventory from differents ERP systems

Scenario:
We have a Magento 1.9 store already in production with a product register integrated with the store's internal system (InfoxA), which automatically manages inventory, price, entry and exit.
The customer has opened a new store, in the same segment, and wants to join the two stores in the Magento system.
However, he want the products in the new store to be managed by another internal system (InfoxB).
Ex. When user inserts in the cart Product A + Product B the system automatically downloads in their respective inventory systems.
Demand:
Products with SKU = "SD" = managed by ERP Infox 1
Products with SKU = "SL" = managed by ERP Infox 2
Summing up:
How to make a system in magento 1.9 manage to have certain products managed by one ERP and others by another ERP?
Solutions:
Multistores?
Multiviews?
Marketplace?
First, make sure all product SKUs are unique between ERPs.
You can have the same SKU in both ERPs, but then you will have to decide where to invoice the item from.
Second, please describe the integration method or protocol between ERP and Magento webstore.
If you are using a Magento extension to get product and inventory data from ERP you could clone the extension with a different namespace (including class names, db table names, Magento system variables names, etc.) and then configure it for the second ERP (asuming both ERPs have a similar platform, version, etc.). You will have to repeat this process every time you make an update to the original extension. However, if your extension also sends orders from webstore back to ERP for invoicing you will have a hard time splitting items between ERP stores.
Third, having separate store views for each ERP inventory will prevent you from displaying all the products in one place. Store views usually help with localization and/or custom page layouts. Having separate stores on your Magento installation should work, but you will need to make all the neccessary system configurations and you will still not be able to display all products in one page.
Fourth, ordering items from different ERPs will most likely break any shopping cart price rules you might need to implemnent later on. For instance, if you discount 10% for a purchase above $100 you then have to decide which ERP makes the discount or how do you split it between both of them.

Prestashop sharing product stock between two seperate prestashop websites

I have a two seperate websites(f.e. abc.com and 123.com) Shops have the same products, but different prices. I want that these two stores would share product stock and nothing more. So I guess it's just one column from database. Is there a good way to synchronize product stock between two seperate prestashop websites?
In order to achieve your goal. You should use the multistore functionality in Prestashop (sharing products and stock), see doc.prestashop.com/display/PS16/Managing+Multiple+Shops
As I assume you aren't using it for a specific reason, you would need to go and create your own module. Your module should register to the actionUpdateQuantity hook, meaning everytime your stock changes, it should do something, namely send a message to the other shop.
Normally, you would use the Prestashop webservice for this kind of behaviour, but as the webservice has some problems with stock management (see http://forge.prestashop.com/browse/PSCSX-3170, mainly having to do with the advanced stock management). I don't know if you use the ASM functionality, but I've created an example module for syncing your stocks. It can be adapted to be compatible with ASM functionality.
In the module configuration, you'll find the Sync URL of the current shop, you can use that URL in the other shop. So you'll install the module on both shops and cross reference them. I've created a separate sync.php file which will be called to sync the stock. As said, normally you should use the webservice functionality for this (and if you dont use ASM, you can adapt it to use the webservice, if you do use ASM, you must adapt it to allow for stock movements and valuation).
For the code, see the repository at https://github.com/mwienk/prestashop-syncstock

How do I get / set product price programmatically?

I'm using Woocommerce and trying to make a desktop application which manipulates products and prices (planning to use visual basic).
I've searched the internet a lot however couldn't find a good answer to where the product names and their prices are stored.
Can I manipulate data using php or mysql from desktop?
WooCommerce stores products in the 'posts' table of the schema. Instead of manually updating the DB, I would use the provided API.
From there, you can let WooCommerce handle all of the nitty gritty of updating products, managing the data structure, etc.
This also allows you to not have updates to WooCommerce break your application if they change their DB layout.
WooCommerce API v3

Magento Multipe websites Share Shopping cart session

i am a new to magento what i am trying to do is share Shopping cart among different stores and there respective websites, I have already implemented the solution provided in this post,
Magento multiple websites share shopping cart, which works but have a limitation,
The Limitation which also is a problem in my case is that if something is 1st added to cart from ROOT category , it remains in session even we switch store(all stores have different ROOT category), also items added from other stores also share same cart session. BUT when i add something to cart from any other Store(Non Default Store) and then move to other stores, Cart Session for every store is created independently(mean there sessions are not shared). Now i wanna know what am i doing wrong here or what must i do to share there sessions.?
Give this a try. I's something I developed for a project on Magento EE 1.12, but it should work on CE also. Magento already shares the cart between store views under the same website. The main idea behind the code is to make magento share the cart for all store views not just the ones in the same website.
I'm not sure it will work for any websites configuration but you can take a shot.
try this works definitely, but its better to overwrite model file.
thanks to this post.
Single Cart multiple websites in Magento
I've made it different way and it works: I have single installation with multple domains and store and single SSL
I have main web site where i have all products from my other websites and it set with SSL.
1. Share customers account between multi-store:
You can configure this feature here: System -> Configuration -> Customer Configuration -> Share Customer Accounts ->Global
2.Share the cart content between Magento multi-store websites:
Magento uses separate cart sessions for each store. To use one website on the checkout session you need to modify the Mage_Checkout_Model_Session class.
Copy this file: app/code/core/Mage/Checkout/Model/Session.php to: app/code/local/Mage/Checkout/Model/Session.php.
After that add the following source code to the class:
class Mage_Checkout_Model_Session extends Mage_Core_Model_Session_Abstract
{
const CHECKOUT_STORE_ID = 1;
public function getCheckoutStoreId()
{
return self::CHECKOUT_STORE_ID;
}
Change CHECKOUT_STORE_ID value 1 to your Magento store ID with all products and SSL.
Next, find all such elements in the file:
Mage::app()->getStore()
and change them to:
Mage::app()->getStore($this->getCheckoutStoreId())
And that is it!
Clear Magento cache and check your store. Now your Magento will use one cart for different multi-domain stores websites.
There are 3 limitations of this solution:
All prices in the cart will be from the store you selected (using
CHECKOUT_STORE_ID). So if you have different prices for different
stores it will not work in the cart.
The currency in the cart will be the same as in the store you selected.
The link for editing items in the cart will will not redirect customer to original cart website.

Is it possible to create a new product by class methods in virtuemart 2?

I have developed a virtual store using virtuemart 2.0.10 and I need the products in a given category have a different flow of purchase.
Is there a way, from the data of an existing product (with name, price, description, etc.) to create a new product with new id and sku, using an image located in a known directory? All done on the front end, as user interaction, using classes of MVC framework of virtuemart 2.
Needs to be done this way for the product to be added to cart separately, even though the same product base, each with its resized image, and when you click it to open the product details displaying a custom image.
If anyone know a way to do, please help! I looked at the classes responsible for registering products in virtuemart but do not know how to do safely from the front-end.
The first step (redirect user to component and create a custom image) is already done and working, the image is saved in directory and its url recorded in session
Take a look at the VirtuemartControllerProduct::CloneProduct function. It will point you down into the VirtueMartModelProduct::createClone function where the work actually goes down.

Categories