Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Use the following javascript code when a Product Category Page viewed:

Code Block
languagejs
linenumberstrue
<script>
function OnVisilabsLoaded(){
	var VL = new Visilabs();
	VL.AddParameter("OM.clist","Category ID");
	//VL.AddParameter("cat","Category ID"); //If you are using Recommendation feature uncomment this line.
	VL.Collect();
	VL.SuggestActions();
}
</script>
Note
titleImportant Notes

-SuggestActions() function must be called only once on every page. Otherwise recommendation won't work properly.

- You must define OnVisilabsLoaded() before calling it. You can do it by inserting the OnVisilabsLoaded() code before the Visilabs RMC main script.

- OnVisilabsLoaded function must be defined only once on every page. When a page has multiple event triggers, for example: Product Page View and Cart Update(Add to/Remove from Cart) event can be triggered on same page; 2 functions must be defined with different names. In this case, since the OnVisilabsLoaded name defined for Product Page View, function name for Cart Update(Add to/Remove from Cart) event must be something else and this function must be called when Cart Update(Add to/Remove from Cart) event triggers.
Example function definition and call for Cart Update(Add to/Remove from Cart) event:

definition: function rdAddtoCart() {
  ...
}
call: rdAddtoCart();


...

Parent Topic: Events that Trigger on Page Loads