uStore JavaScripts repository in GitHub

2,753 views
Skip to first unread message

couch

unread,
Oct 6, 2016, 5:38:24 PM10/6/16
to XMPie Interest Group
Over the years this forum has listed been many good examples of how JavaScript can be used to extend or enhance the uStore user experience. 

Unfortunately, they become lost over time or simply out dated. At any rate, they are difficult to find, update, and manage in this forum environment.

So, I have setup a GitHub repository for all of us as XMPie Users to use and contribute to. https://github.com/xmpie-users/uStore-js/wiki

I'd like to encourage everyone - especially the senior members of the group - to consider joining the GitHub repository team and share some of your code samples.

Already, the site contains more than 25 samples. For example:

  • Auto-refresh the Preview in the customization step, as the user is filling the customization form
  • Multiple cost center fields and cost center validation
  • Resizing the rich text editor
  • Change available clearing method based on user group
  • Restrict new user registration to a specific email domain
  • Changing the whole store design (CSS) based on the logged in user

If you have problems requesting to become a member on the GitHub site, just drop me a note mentioning your GitHub user id and I will invite you in.

Jay Ban

unread,
Oct 6, 2016, 8:42:57 PM10/6/16
to XMPie Interest Group
You are a legend couch!!!

Much appreciated!

J

Quinton Smith

unread,
Oct 7, 2016, 12:09:39 AM10/7/16
to xmpie...@googlegroups.com

Thank you Couch.

This is a commendable initiative and will most certainly add great value in developing the experience.

Much appreciated.

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at https://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/d/optout.


Virus-free. www.avast.com

Simon Knott

unread,
Oct 7, 2016, 4:26:28 AM10/7/16
to XMPie Interest Group
Couch this is a top job well done it will definitely come in handy in the future!!

Regards

Simon Knott

heresh...@icloud.com

unread,
Oct 10, 2016, 5:36:48 AM10/10/16
to XMPie Interest Group
Absolutely Super!

D.J. Cyprich

unread,
Oct 25, 2016, 4:38:38 PM10/25/16
to XMPie Interest Group
How do you add code here? I've written a phone number formatter in JS (https://github.com/johancyprich/FormatPhone) which is used on many dynamic documents that our company is hosting. I've also written other applications in C# (https://github.com/johancyprich/CreateuStoreProxy: generates proxy info without logging into server) and in PowerShell (https://github.com/johancyprich/Show-uStoreLockedUsers: shows locked out users).

couch

unread,
Oct 25, 2016, 5:12:38 PM10/25/16
to XMPie Interest Group
Just have just sent you an invite to the Github project.

If anyone else is interested, just let me know. The more people sharing their ideas and code samples, the better for the whole community.

Christopher Daly

unread,
Nov 2, 2016, 3:31:00 PM11/2/16
to XMPie Interest Group
Couch, this code is great!  Thanks for the hard work putting it all together.

Could I get an invite to the project?  I have some tweaks to propose for the timed auto preview refresh.

prabin maharjan

unread,
Nov 3, 2016, 10:28:34 PM11/3/16
to XMPie Interest Group
Hi Couch,

I am trying to add text on the right hand side of text input box. (inside red circle shown in the attached picture). Is it possible to do.

Regards,
Prabin
Capture.JPG

kara.a....@gmail.com

unread,
Nov 18, 2016, 4:38:18 PM11/18/16
to XMPie Interest Group
Thanks so much Steve!

brycekmartin

unread,
Nov 30, 2016, 6:52:22 AM11/30/16
to XMPie Interest Group
Hey Couch,
Could you add me to the github repo?  I may have some stuff laying around and would love to contribute as I come up with some stuff during my next redesign later in December.

Thanks
Bryce

er...@morrellprinting.com

unread,
Jun 19, 2017, 5:23:23 PM6/19/17
to XMPie Interest Group
Possible to update one of the scripts? The "forcing user to vie view the proof" - looks like in uStore 9 the ID for the proof button has changed to #ctl00_cphMainContent_ctl11_lbtnProof

couch

unread,
Jun 20, 2017, 3:39:09 AM6/20/17
to XMPie Interest Group
Sure, you're welcome to contribute as an editor on the git hub site - just let me know your github ID and I will set you up...

Kumar

unread,
Jul 24, 2017, 3:23:14 AM7/24/17
to XMPie Interest Group
Hi Couch,
Im having some scripts regarding RTE color buttons hiding. If possible could you add me also, so that i can share my views on this.

couch

unread,
Jul 24, 2017, 3:41:35 AM7/24/17
to XMPie Interest Group
Kumar, I added your email to the git-hub repository. if you don't get the invite to join, let me know your github user id and i will repeat the process with that instead of email.

Kumar

unread,
Jul 24, 2017, 5:43:07 AM7/24/17
to XMPie Interest Group
Thank you couch. im in.

Scott b

unread,
Mar 8, 2018, 3:06:12 PM3/8/18
to XMPie Interest Group
Hi couch , a little late to the party here but I have some javascript I think would be useful . it basically sets a read only field to certain custom fields in the user profile .. if you would add me that would be great my GitHub is sjehutch 

Carol

unread,
Mar 13, 2018, 9:25:28 AM3/13/18
to XMPie Interest Group
Thank you very much for this. 

Kind Regards,

Carol France


On Thursday, October 6, 2016 at 5:38:24 PM UTC-4, couch wrote:

lee.b...@alphagraphics.com

unread,
Apr 26, 2018, 9:54:12 AM4/26/18
to XMPie Interest Group
I also have added some thing recently. Pretty useful things to my company that I think will be useful to others. If you could add me as well, that'd be great!

Thanks


On Thursday, October 6, 2016 at 5:38:24 PM UTC-4, couch wrote:

ja...@vsg360.com

unread,
Jul 27, 2018, 6:53:54 PM7/27/18
to XMPie Interest Group
This is great, thanks for sharing this resource!

J Stewart

unread,
Feb 7, 2020, 3:51:14 PM2/7/20
to XMPie Interest Group
Thank you Steve. I will add then as I run across good ones.

Simon Knott

unread,
Feb 27, 2020, 9:19:52 AM2/27/20
to XMPie Interest Group
Hi Steve

Just tried to implement the script "Changing the whole store design (CSS) based on the logged in user" but i couldnt get the following to work:
      //or change the whole store skin like this:
      //$('link[href="/uStore/Images/<current skin folder>/Style.css"]').attr('href','/uStore/Images/<different skin folder>/Style.css');
I believe this is because the link href path links to a storeStyle? tag instead of the actual style.css style sheet. Have you managed to get this to work before as you have it posted as a solution?

Regards

Simon Knott

On Thursday, October 6, 2016 at 10:38:24 PM UTC+1, couch wrote:

couch

unread,
Mar 1, 2020, 6:25:09 PM3/1/20
to XMPie Interest Group
Are you using legacy skins or NG Themes? (The example would have been created some time ago before NG Themes and may need to be reviewed/updated.)

simon knott

unread,
Mar 2, 2020, 4:05:46 AM3/2/20
to xmpie...@googlegroups.com
Hi Couch

This is being used on the legacy skins, not the latest NG themes.

All we would like to do is change the core color based on the usergroup.

Thanks

On Sun, 1 Mar 2020 at 23:25, couch <sco...@gmail.com> wrote:
Are you using legacy skins or NG Themes? (The example would have been created some time ago before NG Themes and may need to be reviewed/updated.)

--
You received this message because you are subscribed to a topic in the Google Groups "XMPie Interest Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xmpie-users/M0Nw-9oKtMQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xmpie-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xmpie-users/af076967-a826-47b0-9fa6-b492629fb319%40googlegroups.com.

Wayne

unread,
Mar 2, 2020, 4:43:58 AM3/2/20
to XMPie Interest Group
In my opinion you are better off doing this sort of stuff like adding custom css, adding favicon's to a store etc.. in the Master Pages.
That way you can control what is initially presented rather than make changes after the DOM has been loaded.

Regards,
Wayne 

Simon Knott

unread,
Mar 2, 2020, 10:08:20 AM3/2/20
to XMPie Interest Group
Hi Wayne

So I had a look in the master pages, and what I could see was this:

<%: Styles.Render(VirtualPathUtility.ToAppRelative(StoreStylePath + "storeStyle")) %>

Are you suggesting we actually replace this with the physical path to the style.css and then use the javascript to change to the alternative sheet?

Regards
Simon Knott

Wayne

unread,
Mar 3, 2020, 6:40:17 AM3/3/20
to XMPie Interest Group
Maybe this should be in a different post, however the CSS can be conditionally added to the Master Pages using c# code.

Simon Knott

unread,
Mar 3, 2020, 7:07:57 AM3/3/20
to XMPie Interest Group
Hi Wayne

Thanks for your suggestion but I posted it here as its a fault with one of the posted solutions within the repository page.

Regards
Simon

Simon Knott

unread,
Mar 10, 2020, 10:57:55 AM3/10/20
to XMPie Interest Group
Hi All

Just to let you know a collegue of mine found a workaround in the end and the code is below:

Instead of using:
      //or change the whole store skin like this:
      //$('link[href="/uStore/Images/<current skin folder>/Style.css"]').attr('href','/uStore/Images/<different skin folder>/Style.css');

Use the following instead:
      $('head').append('<link href="/uStore/Images/<current skin folder>/<alternative style sheet>.css" rel="stylesheet"> ')

What this will do is append an additonal style sheet and then the styles you add in based on your original conditions within your if statement will be applied.

Thanks

couch

unread,
Mar 26, 2020, 7:09:31 PM3/26/20
to XMPie Interest Group
Thanks, I updated the page to include this option.

Hagi asad

unread,
May 13, 2025, 2:18:44 AMMay 13
to XMPie Interest Group
above all the conversation you guys made solved many queries of mine in one go

tsm...@lakecountypress.com

unread,
Jul 11, 2025, 1:45:59 PMJul 11
to XMPie Interest Group
This is awesome.
As a suggestion maybe put a link to the Github site in the " Welcome to the XMPie Interest Group" portion of the landing page just so it is easily accessible for everyone?

Thanks again Couch, for all you do for the community.

couch

unread,
Jul 14, 2025, 12:32:27 AMJul 14
to XMPie Interest Group
@tsmith - good idea. Done!
Reply all
Reply to author
Forward
0 new messages