Differences between revisions 36 and 37
Revision 36 as of 2019-09-03 00:30:00
Size: 4669
Editor: sam
Comment:
Revision 37 as of 2019-11-24 22:31:14
Size: 5061
Editor: sam
Comment:
Deletions are marked like this. Additions are marked like this.
Line 44: Line 44:
2. "log2magento -i" to delete the stocks and categories in the magento. And confirm the stocks and categories are deleted from the magento in magento web page. 2. also need to set the onlin_id of tax in braad , so all the item has the right tax_class_id, tax_class_id can be found in the termin al screen , when running gencont and set MAGENTO_TRACE_XML=1
Line 46: Line 46:
3. clear the online ID for Stocks: "sturep" -> E -> 6 -> "your branch" -> "your branch" -> N -> N -> N -> Y -> hit enter -> hit enter -> hit enter -> hit enter 3, before running any log2magento remember to enable magento cache in the backend, because if cache is not on, any query to magento api will run very slow, and slow down the whole system.
Line 48: Line 48:
4. clear the online ID for Categories: "catrep" -> E -> S -> <leave_blank> -> Y -> N -> hit enter -> hit enter -> hit enter -> hit enter 4. "log2magento -i" to delete the stocks and categories in the magento. And confirm the stocks and categories are deleted from the magento in magento web page.
Line 50: Line 50:
5. "cp $CCDIR/standard/dblog.dat $CCDIR/<your company>/" 5. clear the online ID for Stocks: "sturep" -> E -> 6 -> "your branch" -> "your branch" -> N -> N -> N -> Y -> hit enter -> hit enter -> hit enter -> hit enter
Line 52: Line 52:
6. "gol" -> "fdb2log -B <your branch location> -a8" 6. clear the online ID for Categories: "catrep" -> E -> S -> <leave_blank> -> Y -> N -> hit enter -> hit enter -> hit enter -> hit enter
Line 54: Line 54:
7. "log2magento" to dump the categories to the magento 2 server. 7. "cp $CCDIR/standard/dblog.dat $CCDIR/<your company>/"
Line 56: Line 56:
8. "cp $CCDIR/standard/dblog.dat $CCDIR/<your company>/" 8. "gol" -> "fdb2log -B <your branch location> -a8"
Line 58: Line 58:
9. "fdb2log -B <your branch location> -a9" (remember the number of the stock items!; '''ALSO the images of items could NOT be .bmp type.''') 9. "log2magento" to dump the categories to the magento 2 server.
Line 60: Line 60:
10. "log2magento" to dump the stocks to the magento 2 server. 10. "cp $CCDIR/standard/dblog.dat $CCDIR/<your company>/"

11. "fdb2log -B <your branch location> -a9" (remember the number of the stock items!; '''ALSO the images of items could NOT be .bmp type.''')

12. "log2magento" to dump the stocks to the magento 2 server.

MAGENTO2 Integration Info:

Our Internal Magento2 server is:

http://furniture2.crecom.com.au

Admin page:

http://furniture2.crecom.com.au/administrator

admin login: support

password: control2

Setting up Authentication

1, in the magento2 backend page , navigate to System->integration(under extension)

2, click The "Add New Integration" button.

3, go the "API" tab and select All the api,

4, go back to the "Integration Info" tick all the necessary fields (or choose ALL).

5, click save,

6, after rerutn to the list of intgegrations , click activate .

7, follow the prompt untill you see 4 keys. copy ONLY "Access Token"

8, save the "Access Token" in the following file "CCDIR/COMP/magentotoken/BRCODE.token", note that you need to create the magentotoken dir manually.

9, run staad and make sure it do not give any magento related error.

Create attributes and attribute groups

Go to Stores->Product (make sure type is dropdown, and set global in advanced)

Go to Stores->Attribute Groups

Re-import Stock and Categories from Control to Magento2 Database:

0. mark sure dumpodbc and impmagord is not running in the background. use "initctl list" and "initctl stop dumpodbc"

1. use "coaad" page 2,"braad" online,"gencont" online, "coxaad" online ord id and "condisp -c -b" to make sure you are in the right branch and company. also you can "export SCRIPT_ID=$NODEID" to make sure the log2magento program won't be affected by the false errors.

2. also need to set the onlin_id of tax in braad , so all the item has the right tax_class_id, tax_class_id can be found in the termin al screen , when running gencont and set MAGENTO_TRACE_XML=1

3, before running any log2magento remember to enable magento cache in the backend, because if cache is not on, any query to magento api will run very slow, and slow down the whole system.

4. "log2magento -i" to delete the stocks and categories in the magento. And confirm the stocks and categories are deleted from the magento in magento web page.

5. clear the online ID for Stocks: "sturep" -> E -> 6 -> "your branch" -> "your branch" -> N -> N -> N -> Y -> hit enter -> hit enter -> hit enter -> hit enter

6. clear the online ID for Categories: "catrep" -> E -> S -> <leave_blank> -> Y -> N -> hit enter -> hit enter -> hit enter -> hit enter

7. "cp $CCDIR/standard/dblog.dat $CCDIR/<your company>/"

8. "gol" -> "fdb2log -B <your branch location> -a8"

9. "log2magento" to dump the categories to the magento 2 server.

10. "cp $CCDIR/standard/dblog.dat $CCDIR/<your company>/"

11. "fdb2log -B <your branch location> -a9" (remember the number of the stock items!; ALSO the images of items could NOT be .bmp type.)

12. "log2magento" to dump the stocks to the magento 2 server.

//

!!!! KEEP CHECKING the stock numbers in the MAGENTO server. IF the magento server's stock number is not increased for 10 mins and the stock number is the same as the stock number which is generated by step 9. We need to manually kill the log2magento process.

Setup the automatic magento <=> control scripts:

check /etc/init/dumpodbc.conf and /etc/init/impmagord.conf, make sure they are conset to the right company and location.

1. initctl list (make sure dumpodbc and impmagord is not running)

2. initctl start dumpodbc

3. initctl start impmagord

4. Go to your magento 2 root directory and run the following to create cron jobs for Control:

php bin/magento cron:install --force

Set up standard online store widgets (New Products, Featured Products) check this link, has pictures https://www.toptal.com/magento/custom-widgets-in-magento-2

  1. Go to Content -> Widget

  2. Click on the Add Widget button. After that, we’ll be redirected to the Settings tab, where we have to select Type and Design options and themes.

  3. Under Type, choose "Catalog New Product List" (for New Products), or choose "Catalog Product List" (for Featured Products)
  4. Chose a Design theme, built in theme "Luma" will do.
  5. After selecting both values, we have to move on the second step, where we have to fill storefront properties. Now we have to set the Widget Title and Storefront Properties, such as Widget Title and Store View. We are using Control New Product List and All Store Views.

  6. Fill in the Layout Updates settings with the following options: Display On: Specified Page or All pages. Page: CMS Home Page Container: Main Content Area Template: Grid mode

  7. Go to the Widget Options tab. Select "New products" for New Products. "All products" for Featured products
  8. For Featured products, add a condition that says "promote" (a yes or no attribute) is "yes"
  9. Manually clear your cache. It should appear on the home page.

Magento 2 Account info (for upgrading and buying with private/public keys):

support@creativecomputing.com.au 11QQaa!!

Magento2 (last edited 2025-10-02 03:12:46 by KafuWong)