Thursday, November 7, 2013

This isn't required but you might find it helpful if you don't have spare products, they all fall within your discount rules you already made for a group or you want a custom wholesale welcome page. In my wholesale group I created a Wholesale Information product category, but with the normal template it would display that there are no products in that category after whatever information you put in for the page.  So here's how to make it look like a normal page:

  • The category product content is set by the CategoryContent panel. 
  • Copy and paste the script into a new Notepad or Notepad ++ document. 
  • Remove the   %%GLOBAL_CategoryProductListing%% from the panel, and save the document as a HTML file with a new name. I saved mine as CategoryNoContent.html. 
  • Then save it in the Panel part of your template directory.
  • Now you have to create a new category template.  Copy and paste the code from your Category.html template file.
  • Replace the %%Panel.CategortConent%% with %%Panel.CategoryNoContent%%
  • When you save the new category template make sure it is save with an underscore: _Category1.html
  • Now when you create your category page use the selector for the template file to choose the new category template


Now that you've created that handy dandy panel, and have taken care of the most common problem that those of you who want to have a Wholesale and Retail group we can tackle shipping methods. If you created a panel for your Javascript this will be much easier that trying to find the script and entering it in.

**This is for a single Shipping Zone with multiple shipping methods**  Each method in the HTML ends with an underscore and a number like this: _0 or _1 to figure out what these are you can use your browsers developer console. So, in the example script below I have four shipping options beginning with 0 and going to 3. For wholesale groups I want to hide 0-2, but for retail groups I want to hide. I've also added it to the pre-existing script in the panel so that the complete script now looks like this:

<script type="text/javascript">
$(document).ready(function()
{
// Begin WholeSale Group COD payment Method display
if($('a[href$="/wholesaler-information/"]').length > 0) {
$("#checkout_provider_checkout_cod.PAYMENT_PROVIDER_OFFLINE,input.PAYMENT_PROVIDER_OFFLINE").show();
$(".ProviderNamecheckout_cod").show();
//Shipping Method Display
hideForZone(0);
hideForZone(1);
hideForZone(2);
}
else {
hideForZone(3);
}
});
function hideForZone(digit) {
$('.ShippingProviderList input[id$="' + digit + '"]').hide();
$('.ShippingProviderList label[for$="_' + digit + '"]').hide();
}
 </script>
The most common problem with not having an intuitive way to show or hide certain options throughout Bigcommerce based on customer groups is payment options for Wholesale or Retail groups.

This will walk you through how to set up a COD payment method for Wholesale Customers.

Set your checkout process to multi-page checkout. This method only works with the multi-page check out process.


Making the CSS for Payment Options: Generally, the biggest request is to show/hide a COD payment option. So that is what this will achieve. However you can do this for other payment options, but you have to know what their identifier is.** To do this see the notes at the end of this set-up.** Copy and paste this code into the bottom of your styles.css BEFORE you add the payment option. This will ensure that it does not show up for one or the other group.

/*COD Payment Option Display*/

#checkout_provider_checkout_cod {
display: none;
}
.ProviderNamecheckout_cod {
display:none;
}
#checkout_provider_checkout_cod .PAYMENT_PROVIDER_OFFLINE,
input.PAYMENT_PROVIDER_OFFLINE  {
display: none;
}
 Now that you have set the COD to not display as a default you can go and activate it in the payment area of your Big Commerce.

Implementing the script:



  • You can make the script into a panel which can then be inserted. But you need WebDav or FTP to do this.
    • Open up Notepad or Notepad ++ and insert the script.
    • Save your document as and html and as something easily identifiable like WholesaleAccount or RetailAccount
    • Upload the document into the panels directory. Now you just have to create a reference to it like this  %%Panel.WholesaleAccount%% in your Header panel.
  • You can insert the script directly into your Header panel. NOTE: I used the panel method. The direct insertion method has not been tested.

The Script:
<script type="text/javascript">
$(document).ready(function()
{
// Begin Wholesale Group COD payment Method display
if($('a[href$="http://www.teststore.com/hot-deals"]').length > 0) {
$("#checkout_provider_checkout_cod .PAYMENT_PROVIDER_OFFLINE,input.PAYMENT_PROVIDER_OFFLINE").show();
$(".ProviderNamecheckout_cod").show();
});
  </script>
Notes: If you want to add and manipulate other payment options you have to know what their identifier is. I only know what the above identifier is because I turned it on and grabbed the line of code I needed and turned it off. But my site has low traffic, if you have a higher traffic flow you might want to open a test store in big commerce and follow the steps below to get the reference you need.

  • Turn on the desired payment option(s)
  • Grab a product for your cart and go through the check out. 
  • Once you get to the payment page use your browsers developer console to find the id for the payment option. 
  •  Snag the payment options from the HTML. You can write them down or copy/paste into a text editor. 
  •  Now you have them and you can manipulate them in the CSS. Remember if you are working on a live store you want to add them to the CSS and set the display to none before turning on that payment option so that John Smith doesn't use that to buy a product if he's not supposed to. 


Big Commerce doesn't yet have a way to query and find the active customer group for a logged in customer. So here's a series of posts to help you set up distinguishing characteristics and items you can show or hide based on those characteristics. 

1. Create at least two customer Groups and define one of the customer groups as the default customer group. If you create a Retail and Wholesale group use the Retail Group as the default group.


A. If you are coming late in the game and have a host of customers unassigned you can go  to: Customer > View all Customers >  Export all Customers Drop down > Select to CSV or XML File > Click Confirm > Choose the bulk edit template > Choose the Microsoft Excel (CSV) format > Click continue > Click the Export link > Click Download

B. Open your Excel/CSV file > go to the column labeled "Customer Group" > Enter in your default customer group name for each member that will be in the default group, which should be every member NOT in a specialized group. You can copy/paste here> once finished save the file >click "yes" to the type of save

C. Importing: Customers>import customers> click "yes" to the bulk-edit re-import > choose the file to upload > upload > click next > leave all the match case the same click next > start import

D. Congratulations! You have updated all of your customers.

2. Create a product category for one of the groups that only that group will see. For example a "Hot Deals" or "Last Chance." That only the Retail group will have access to.  You can also do the same for the wholesale group if you'd like.

A. In your group permissions set the product category visibility to reflect the category you have created. If you made a category for the Retail group make it so that the Retail group has access and make it so the Wholesale group does not and vice versa. Make sure to set it for ALL the categories and subcategories you have products in. 

Now you have set up a distinguishing characteristic in the form of a link that will only appear to a specific customer group.
I just want to be brief and explain that this is just a journal for useful Bigcommerce information. It's not something that will be updated with any frequency, but when I work on projects for clients and find something useful I'll post it here. If you need help with implementing anything I've posted you can contact me for rates.

Thanks,
Alizza