Skip to main content

wcs query to fetch shipping cost by store

In websphere commerce 7 model you can use the folloging query to fetch the shipping cost of catalog entries. This query could also be useful for newer versions.

select cr.calrange_id,cc.calcode_id, c.partnumber,j.code,j.description,value from catentry c
left outer join CATENCALCD cd on c.catentry_id=cd.catentry_id
left outer join calcode cc on  cd.calcode_id=cc.calcode_id
left outer join calrule r on cc.calcode_id=r.calcode_id
left outer join CRULESCALE s on r.calrule_id=s.calrule_id
left outer join CALRANGE cr on s.calscale_id=cr.calscale_id
left outer join CALRLOOKUP cl on cr.CALRANGE_id=cl.CALRANGE_id
left outer join SHPJCRULE sr on sr.calrule_id=r.calrule_id
left outer join JURSTGROUP jg on jg.jurstgroup_id=sr.jurstgroup_id
left outer join JURSTGPREL jgr on jgr.jurstgroup_id=jg.jurstgroup_id
left outer join JURST j on j.jurst_id=jgr.jurst_id
where (partnumber like 'partnumber% )
and catenttype_id in ('ItemBean','PackageBean')
and cc.storeent_id=storeid

and cr.markfordelete=0

Comments

Popular posts from this blog

Quarkus goes Reactive☢

In this tutorial I will explain how to create a quarkus based java application that will use reactive datasource to connect to a postgres database and be able to perform crud operations via rest endpoint. To make it more real this application will also be published into kubernetes cluster and will use configmap to store datasource configuration. To lern more about benefits of reactive data sources vs. jdbc regular data sources you can go to following link https://cutt.ly/1l260tK.  Step 1: Configure Project 

Configuring web application with gwt+spring+hibernate

Building a web application using hibernate, spring and gwt. This time we will show how to create and cofigure an application that will use hibernate , spring and gwt. I will use HR sample database that comes with OracleXE. First , you have to create a GWT project (you can follow the steps for that on  https://developers.google.com/web-toolkit/ ) After you have the project created you need to create a tree of packages like that: Open HumanResources.gwt.xml and add the following line : By doing that you tell gwt to include model package and all dependent packages into gwt compilation Now we can start configuring spring and hibernate. to configure spring first you have to add the following lines on web.xml This will allow spring context to start doing its business. The you will have to create a field called "app-config.xml" in which you will define the settings for spring and hibernate. Over this app-config file first configure the properties as follo...

Register new WCS store view by using database

To register a new view by using SQL queries: insert into acaction (acaction_id, action) values ((select counter from keys where tablename='acaction'), 'NewView');  insert into acactactgp (ACACTGRP_ID,ACACTION_ID) values  ((SELECT ACACTGRP_ID FROM ACACTGRP WHERE GROUPNAME = 'AllSiteUsersViews'  and member_id in (select orgentity_id from orgentity where orgentityname='Root Organization')  ),  (select acaction_id from acaction where action='NewView'));  UPDATE KEYS SET COUNTER = COUNTER+1 WHERE TABLENAME = 'acaction'; commit