Tag: jquery

  • BigCommerce Mod : Custom product tabs

    This is a simple mod that allow us to have custom product tabs in BigCommerce system, there is no limit on how many tabs you can have. Our final result will be this.

    Mod

    This mod requires modification to only one file /Panels/ProductTabs.html

    Step 1

    Add current JavaScript to the existing script tag

    	/**
    	 * Overrides  parts of /javascript/product.functions.js#GenerateProductTabs() function
    	 * as it does not support related products	 
    	*/
    	$(document).ready(function()
    	{
    			var id = 'RelatedProducts';
    			var TabName = 'Related Products';
    			 var ProductTab = '
  • '+TabName+'
  • '; $('#ProductTabsList').append(ProductTab); });

    Step 2

    Here we actually add content of our tab.

    	
    

    One thing to not is that the div id ‘RelatedProducts’ relates to javascript id ‘RelatedProducts’ so if you change that you need to change the div id.

    That is, if we wanted to add additional tabs we simply would use an array.

  • BigCommerce Mod : Show brand logo image on Product Page

    Showing brand logos on product pages in BigCommerce sites is harder than it should be. Here is a quick mod that will let us do that without need of using the API.
    Here is the desired result

    Code

    This works by parsing you /brands page and then comparing current brand name to the one from parsed page.

    Lets edit Panels/ProductPanels.html and change the current brand code into this

    %%LNG_Brand%%:

    %%GLOBAL_BrandName%%
  • Handling ENTER in TextBox, ASP.NET

    Well here is my way on how to handle the ENTER key on the TextBox in asp.net so it execute my method call instead the default form action.
    I have a textbox and a linkbutton that invokes the search, but I also would like to hook up to that linkbutton when I press ENTER on the TextBox so I would perform the search, but by default it would invoke the form submit which is not what we want. So here is a quick solution using javascript, I know there are other one but this one is short and it works well.