Saturday, December 1, 2012

Mobile Specific Routing in IBM WCS

Step 1:-
Crete a sub package com.ibm.commerce.foundation-ext

Step 2:-
Navigate to the WC_eardir/xml/config/com.ibm.commerce.foundation directory and copy the wc-devices.xml file into the extensions directory you created in the preceding step.

Step 3:-Add your devices to the wc-devices.xml extension file
(a) Open the new wc-devices.xml, located in your extensions directory.
(b) Replace the default device mappings with your own mappings
(c) Also add  your new devices

Step 4:-
For testing:-
When we try to test the above things with simulator .It won’t pick the Mobile Browser ID (User-Agent) Strings for the actual device.
It always picking a User-Agent value of that browser, on the browser we have opened a simulator.
For testing with simulator or normal browser we need to make a below entry in wc-devices.xml.
For Google Chrome:-
<_config:device name="Apple WebKit" useragentpattern=".*AppleWebKit/535.11.*">
<_config:device name="Apple WebKit1" useragentpattern="AppleWebKit/535.11">
Now browser will act as mobile device and siumulator will also work
For Internet explorer:-
<_config:device name="MSIE 9.0" useragerntpattern=".*MSIE 9.0.*">
Now internet browser will act as mobile device and simulator will also work
Best approach to print a user agent string for your browser on console and the add userAgentPattern accordingly
.Then same browser works as mobile device. We can use below code for the same
String userAgent= request.getHeader("User-Agent").
If value of userAgent comes  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) then we can specify
userAgerntPattern=".*MSIE 9.0.*" as above
We can get details about Mobile Browser ID (User-Agent) Strings using below URL
http://www.zytrax.com/tech/web/mobile_ids.html





 

AccountIQ install Certificate

Installing certificates-


1. C:\Users\[user]>keytool -importcert -file D:\ofbiz\ecom_Urgent_Docs\AccountIq\appdb.visor.ie.crt -keystore D:\ofbiz\ecom_Urgent_Docs\AccountIq\keystore.txt -storepass admin1


2. add to java


// System.setProperty( "javax.net.ssl.trustStore", "D:/ofbiz/ecom_Urgent_Docs/AccountIq/keystore.txt" );


// System.setProperty( "javax.net.ssl.trustStorePassword", "admin1" );

IBM WCS Shipping by Weight

Research Shipping
how to change SKU and find out its weight
2. select * from CATENTSHIP where catentry_id=11729;
3. Select * from catentry where catentry_id=11729;
4.   Marker -
5. Select * from POLICY where storeent_id = (Select Store_id from Store where directory =
5.
6. 'MarkerStorefrontAssetStore') ;
7.
8. select * from policycmd where policy_id in ( Select policy_id from POLICY where storeent_id =
9. (Select Store_id from Store where directory = 'MarkerStorefrontAssetStore'));
10.
11.select CALSCALE_ID,CODE from CALSCALE with ur; 12204 'us_ground_na '
12.
13.select * from CALRANGE;
14.update CALRANGE set CALMETHOD_ID=-33 where CALSCALE_ID=12204 with ur;
15.
16.sHIPPING-
17.select * from calmethod;
18.SELECT * FROM CALRULE;
19.select * from calscale;
20.select * from calrange;
21.select * from CALUSAGE; // TAX , SHIPPING , SHIPPINGDISCOUNT ETC
22.select * from crulescale;
23.
24.
25.select * from SHiPMODE;
26.select * from SHPMODCLCD;
27.
28.//select * from calrange where calscale_id=13701 ;
29.
30.// WEIGHT ,HEIGHT ETC DETAILS
31.CATENTSHIP

Swith User Agent of Browser


Will be very useful for testing purpose.
1       . Install add on “User agent switcher”
2        . Now go to tools and swith user agent. See following screen shot