My Stuff

BrettKnights Red Ribbon

Comments

  • Aside from the usual options like optimizing image sizes and using height and width tags on images one big thing with NS is minimizing the number of files downloaded per page. NS's speed issue is one of latency, not bandwidth. It appears to take NS time to find each file and to start delivering it. e.g. combine all your…
  • when you look at the page source is there an element with cusentity10 as its id? Does it show up before or after your script? Given those instructions that script would be on every page of your site and would throw that error whenever you are not on the form page. You might try: var elem =…
  • I'm hoping that someone may have encountered this before and has a clever workaround (or better yet, knows of a way to actually fix it instead of working around it). We have two websites run under a single company. We have been able to set the "from" email address for most of our transaction emails on a per-site basis…
  • Does anyone know how to export the following web Site Category fields? Subcategory of Category List Layout Item List Layout Related Items List Layout Upsell Items List Layout Display in Web Site Inactive Internal ID Meta Tag HTML Search Keywords Exclude from Sitemap Case# 1531241 it looks like these fields are all…
  • Unfortunately a lot of my scripts are in Groovy or Scala and I've built up the sample java client to manage some of the complexity of dealing with large lists. The following is a java sample of creating a category. It's pretty vanilla: import net.qicnet.netsuite.webservices_2_6.NSClientImpl; import…
  • In the simplest case you'd have to create your affiliate link with script on the confirmation page. You can get a list of order items with a tag: var itemsInOrder = "<%=getCurrentAttribute('confirmation','orderitems')%>"; var lineItem = itemsInOrder.split("||"); document.write ("<img src='affiliateurl?numitems="+…
  • Or if your product line is everything under a tab or category you can use a tag and tag substitution: <img src='<PRODUCT_LINE_BANNER_URL>' alt='<PRODUCT_LINE_LABEL'>> or use the tag to supply whole chunks of html <div id="product-line-banner"> <PRODUCT_LINE_BANNER </div>
  • You can both import and export via Web Services. Getting off the ground has some learning curve. You'll need some skills in PHP, C# or Java to be able to take advantage of people's experience. Mine is mostly in Java. It's possible that generating your menus could be done in a Scheduled Script. You can get all the category…
  • At this point I believe all the fields you can see in the NS GUI are available for export via Web Services. There are various ways you could set that up depending on where you need to use the export. What are you trying to do with the info?
  • Be wary of the global variable. That was the first thing I tried but sometimes NS keeps the context so your global variable is still set and sometimes it doesn't
  • You can't do this directly. What you can do is add a custom field and have that show in the checkout. A script could copy that to the alt phone field if you can't just use the custom field.
  • I am trying to add an item to my cart programmatically using suite script. I wrote the following recalc code that gets executed (just a snippet). ------------- function recalcCart(type, name) { //PRE PROCESSING nlapiSelectNewLineItem('item'); nlapiSetCurrentLineItemValue('item','item','1000',true,true);…
  • I'd like to put several items in our web store on sale but not use a promotion code to do so. is there a way to apply a discount percentage to an item automatically without changing the actual price, so that the item displays "old price: $XX, sale price: $YY" ?? all our customers have assigned price levels so using the…
  • A scheduled script was where this was run. This could also be adapted to work in a mass update script.
  • you might find the following a useful starting point. The following code was used to add an item to an "Item of the Day" category. I've removed most of the details since your case is somewhat different but this code add an item to a category and then sets its online price. The current price is saved in price level 8 which…
  • I would like the store search to display items that have stock first. For example, If the customer searches for a Brown Widget and we offer 4 different items with the description of Brown Widget, we would like the one that we have stock on display first in the results., with out of stock items showing up last. Anyone know…
  • You can dynamically populate such a list by doing an AJAX call to a suitelet. This works for both hosted and WSDK sites. For data like employees where the list doesn't depend on the logged in user or on anything about a session you can also cache the data and include it without client-side scripting. To do this you'd have…
  • Travis I think you'd have to remove all authorization and then manually trigger authorization when needed or after taking the order. Doing it before submit should work though I'd think a failure wouldn't be pretty. You should also be able to turn off automatic authorization and use the the eMerchant Solutions or PayFlow…
  • If you are talking about updating the store category to which an item is assigned you can do that via scripting. If you are talking about changing the parents of the categories themselves the supported ways to do that are via smbxml or SuiteTalk. Categories can also be manipulated server-side with SuiteScript. The record…
  • Before you proceed further with trying to fix anything make sure you've set a DOCTYPE on your site. Use the doctype for HTML4.01 or HTML5. If you've already done a bunch of work on your site doing this may break break layout in IE (many quirks mode hacks mess up standards mode) but over time you'll get great benefit from…
  • You can't do this without some work. What I have done is: The issue is same origin policies and scripts/cookies. You can store information (use one of the localStorage libraries to make this as efficient as possible) when you add items to the cart. To validate that information based on what is in the cart you need to…
  • Do it early: Setup | Web Site | Set Up Web Site Advanced tab Highly recommend <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> or for HTML5 <!DOCTYPE html> NS doesn't serve xhtml so setting that as a doctype seems pointless to me. Does anyone know if using xhtml…
  • Please put it in as public bundle if you determine that it works as expected. thanks, t It works as expected since it's been in place and working since at least January. I'm not sure how amenable it would be to bundling but my experience so far with web oriented bundles is that you'd still have to perform some manual…
  • Hello, Yes I can help you with this. Give me a call at 206-866-5646 or email me at brett@knightsofthenet.com
  • Brett, So does this script just set the residential flag on the address or does it do more then this? Thanks It sets the shipisresidential field on the sales order and then clears and then re-sets the shipmethod (to force the ship cost recalculation).
  • have you tried the fire field event and synchronous flags?: e.g. nlapiSetFieldValue('shippingcost', null, false, true); nlapiSetFieldValue('handlingcost', null, false, true); // if you set it to start nlapiSetFieldValue('shipmethod', upsGroundMethod, true, true);
  • One way to do it is to rename your shipping methods with a two digit numeric prefix so they sort the way you want them to. e.g. "01 - UPS 2nd Day Air". The prefix isn't too ugly and it will show up on printed and emailed documentation. You can remove the prefix in the checkout by applying some jQuery to your checkout…
  • I do this in a before submit event. the relevant part is var newCustomer = nlapiGetNewRecord(); newCustomer.setFieldValue('parent', parentId); though I suspect calling nlapiSetFieldValue('parent', parentId); would work just as well but the newCustomer version has been in production for a few years. I suspect your…
  • Travis, the biggest thing is to use the recalc toggle method I outlined here. In order to interact with the shipping estimator I had to trap changes to the shipaddress and other ship fields like ship zip and trap fieldchanged, recalc and postsourcing events. Also if you have handling costs you'll need to set those as well.…
  • Mike, If you make the price variable you could use a script on the buy page to calculate the LxW price and send that to the cart. The customer would be buying 1 piece with custom options of length and width and the correct price for those dimensions. For the cart this might have to be a non-Inventory item of some sort. In…