Wcs | Commerce Blog
Maybe your like
Goal:
Replace all relative paths to absolute from static contents. The statics contents include: JavaScript, Style Sheet and images.
It is interesting to use the sharding technique to provide a simultaneous download and enabling page load efficiency for a better user experience.
To apply this technique:
– Create a sub domain for Style Sheet
– Create a sub domain for JavaScript
– Create one or more sub domains for images which can be downloaded simultaneous, It is interesting have more than a sub domain, the site will be able to handle more than a image request.
The general steps for implementing domain sharding on a site would be:
- Create the sub domains to be used for sharding.
- Configure the web server to use these domains and to serve the static content.
- Update the pages to point the resource URLs to the shards.
To see the technical solution, click here: Akamai implementation using WebSphere Commerce
Thanks,
Sep12 StandardRefresh Areas are created when you need to refresh with new content when users interact with the user interface. For this case, it is necessary to use the render context, refresh area and refresh controllers API from the WebSphere Commerce AJAX framework.
Follow a step-by-step in how to create a refresh area.
1.) Identify the fragment you want to refresh
2.) Create an action and a forward in struts-config-ext.xml
<forward className=”com.ibm.commerce.struts.ECActionForward” name=”ShipServiceMethodsDisplayView/10101″ path=”/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentShippingMethodDetails.jsp”/>
<action path=”/ShipServiceMethodsDisplayView” type=”com.ibm.commerce.action.ExtendedBaseAction”/>
3.) Create the Access Control Policies and Run in your environment or you can just insert into your database as well:
insert into acaction ( acaction_id, action) values ( (select min(acaction_id) – 1 from acaction), ‘ShipServiceMethodsDisplayView’); insert into acactactgp (acaction_id, acactgrp_id) values ( (select acaction_id from acaction where action = ‘ShipServiceMethodsDisplayView’), (select acactgrp_id from acactgrp where groupname = ‘AllSiteUsersViews’) );
4.) Define in a .js file the context. The context will handle and allow to refresh the area
wc.render.declareContext(“shippingServiceAllAreaContext”,{orderId:””,addressId:””},””);
5.) Declare the controler. This allow to refresh the context
wc.render.declareRefreshController({ id: “shippingServiceAllAreaController”, renderContext: wc.render.getContextById(“shippingServiceAllAreaContext”), url: “ShipServiceMethodsDisplayView”, formId: “”
,modelChangedHandler: function(message, widget) { var controller = this; var renderContext = this.renderContext; widget.refresh(renderContext.properties); } ,renderContextChangedHandler: function(message, widget) { var controller = this; var renderContext = this.renderContext; widget.refresh(renderContext.properties); } ,postRefreshHandler: function(widget) { var controller = this; var renderContext = this.renderContext; cursor_clear(); }
6.) Now, add the refresh area widget where the jsp is include
<div dojoType=”wc.widget.RefreshArea” widgetId=”shippingServiceAllArea” controllerId=”shippingServiceAllAreaController” id=”shippingServiceAllArea”> <%out.flush();%> <c:import url=”/${sdb.jspStoreDir}/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentShippingMethodDetails.jsp”> <c:param value=”${currentOrderId}” name=”orderId”/> </c:import> <%out.flush();%> </div> <script type=”text/javascript”> dojo.addOnLoad(function() { parseWidget(“shippingServiceAllArea”); }); </script>
* Do not forget to add parseWidget with the refreshArea widget id.
7.) Now you must identify when to call the refresh controller and update the context according with your process
wc.render.getRefreshControllerById(‘shippingServiceAllAreaController’); wc.render.updateContext(‘shippingServiceAllAreaContext’,{orderId:thisOrderId ,address:thisAddressId});
For more information, explore WCS Ajax Framework
I hope you guys can enjoy it 🙂
Jul17 StandardHello guys,
Follow a useful script to create and delete WCS users using only SQL commands. This can be use to facilitate your unit tests to login and logout commands.
Deleting users
/** If you need to delete an user you must follow this sequence to respect the keys **/
DELETE MBRROLE WHERE MEMBER_ID IN(<your ids>);
DELETE ADDRESS WHERE ADDRESS_ID IN(<your ids>);
DELETE ADDRBOOK WHERE ADDRBOOK_ID IN(<your ids>);
DELETE USERREG WHERE USERS_ID IN(<your ids>);
DELETE USERS WHERE USERS_ID IN(<your ids>);
DELETE MEMBER WHERE MEMBER_ID IN(<your ids>);
COMMIT;
Creating user
/** User 1 – [email protected]/wcsadmin **/— the user must be a memberINSERT INTO MEMBER (MEMBER_ID, “TYPE”, “STATE”, OPTCOUNTER)VALUES (-9991, ‘U’, 1, NULL);
— you must define the userINSERT INTO USERS (USERS_ID, DN, REGISTERTYPE, PROFILETYPE, LANGUAGE_ID, FIELD1, SETCCURR, FIELD3, FIELD2, LASTORDER, REGISTRATION, LASTSESSION, REGISTRATIONUPDATE, REGISTRATIONCANCEL, PREVLASTSESSION, OPTCOUNTER, PERSONALIZATIONID)VALUES (-9991, ‘[email protected],o=root organization’, ‘R’, ‘B’, -6, NULL, NULL, NULL, NULL, NULL, ‘2011-06-15 15:11:17.223’, ‘2011-07-25 11:34:34.497’, ‘2011-06-30 09:36:38.310’, NULL, NULL, 71, ‘1308084610140-1’);
— now let’s set an user id and his password, this password represent the value wcsadminINSERT INTO USERREG (USERS_ID, STATUS, PLCYACCT_ID, LOGONID, LOGONPASSWORD, PASSWORDEXPIRED, CHALLENGEQUESTION, CHALLENGEANSWER, TIMEOUT, PASSWORDRETRIES, SALT, PASSWORDCREATION, PASSWORDINVALID, OPTCOUNTER)VALUES (-9991, 1, -1, ‘[email protected]’, X’74434F61354F51593862415655304D5268424E54723865685653356151374A2B353163506C4261363730633D202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020′, 0, ‘-‘, ‘-‘, -1, 0, ‘hsdbacehyoyn’, ‘2011-07-22 15:37:47.178’, ‘2011-07-25 11:33:06.158’, 36);
— now lets create and address bookINSERT INTO ADDRBOOK (ADDRBOOK_ID, MEMBER_ID, “TYPE”, DISPLAYNAME, DESCRIPTION, OPTCOUNTER)VALUES (-9991, -9991, NULL, ‘Internal use only.-‘, NULL, NULL);
— and set an address to his address bookINSERT INTO ADDRESS (ADDRESS_ID, ADDRESSTYPE, MEMBER_ID, ADDRBOOK_ID, ORGUNITNAME, FIELD3, BILLINGCODE, BILLINGCODETYPE, STATUS, ORGNAME, ISPRIMARY, LASTNAME, PERSONTITLE, FIRSTNAME, MIDDLENAME, BUSINESSTITLE, PHONE1, FAX1, PHONE2, ADDRESS1, FAX2, NICKNAME, ADDRESS2, ADDRESS3, CITY, “STATE”, COUNTRY, ZIPCODE, EMAIL1, EMAIL2, PHONE1TYPE, PHONE2TYPE, PUBLISHPHONE1, PUBLISHPHONE2, BESTCALLINGTIME, PACKAGESUPPRESSION, LASTCREATE, OFFICEADDRESS, SELFADDRESS, FIELD1, FIELD2, TAXGEOCODE, SHIPPINGGEOCODE, MOBILEPHONE1, MOBILEPHONE1CNTRY, OPTCOUNTER)VALUES (-9991, NULL, -9991, -9991, NULL, NULL, NULL, NULL, ‘P’, NULL, 1, ‘[email protected]’, NULL, ‘[email protected]’, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘[email protected]’, NULL, NULL, NULL, NULL, NULL, NULL, ‘[email protected]’, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1);
— I created this user to the role registered users (-29) and to the root organization (-2001)— if you want to a specific organization, you must select which organization you want – checking in orgentity table— if you want to a specific role you must select which role you need at role table INSERT INTO MBRROLE (MEMBER_ID, ROLE_ID, ORGENTITY_ID, OPTCOUNTER)VALUES (-9991, -29, -2001, 29568);
COMMIT;
Just to remember:
This script will allow you to perform unit tests locally about login / logout. If you want to use this script to create a user to be able to run the whole flow (user registration and checkout flow) you must set correctly the data in ADDRESS table, i.e: setting isprimary, selfaddress, addresstype, etc.
Well, but this stay for another topic 🙂
I hope you can enjoy it.
Karen
Blogs I Follow- WordPress.com News
- Google Tag Manager
- DB2 – Explain Plan using db2expln tool
- Akamai implementation using WebSphere Commerce
- Creating Refresh Area in Websphere Commerce with Dojo
- Calculadora de Exposição ao Risco
| Karen on How to create and delete users… | |
| Uday Nagar on How to create and delete users… | |
| Venkatesh on Creating Refresh Area in Websp… | |
| gnsh on How to create and delete users… | |
| Karen on Configuring SQL Profiller |
- February 2014
- December 2013
- November 2013
- September 2013
- July 2013
- June 2013
- Analytics
- Dispositivos Móveis
- Performance
- Profilling
- Uncategorized
- Usefull
- Create account
- Log in
- Entries feed
- Comments feed
- WordPress.com
The latest news on WordPress.com and the WordPress community.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy- Subscribe Subscribed
-
Commerce Blog Sign me up - Already have a WordPress.com account? Log in now.
-
-
-
Commerce Blog - Subscribe Subscribed
- Sign up
- Log in
- Report this content
- View site in Reader
- Manage subscriptions
- Collapse this bar
-
Tag » Com.ibm.commerce.struts.ajax Action
-
AjaxComponentServiceAction
-
Package Com.ruts
-
Client Library Enablement For Struts
-
Struts Actions AjaxComponentServiceAction
-
Implementing AjaxAction Based Commands - Wcs
-
Introduction To The Struts Framework With WebSphere Commerce
-
February 2014 - Amazing World Of Commerce
-
STRUTS Action-mapping Properties - WCS Tips
-
The AJAX Handler Will Be /AjaxPPTGiftCardsBalanceEnquiry - Wcs
-
[PDF] WebSphere Commerce Best Practices In Web 2.0 Store
-
[PDF] WebSphere Commerce Line-of-Business Tooling Customization