Wishlist Code (Part 1, Dec. 2017)

Tutorial Video

Code Queen Nayeli walks you step by step on how to create a Wish List using Wix Code on your Wix website. Wix Code is now available on ALL Wix accounts!

Follow Along #1

Tutorial Page


Good to Know #1

The Code

Be sure to watch the tutorial video above to understand the code and how to modify it.

import wixUsers from 'wix-users';
import wixData from 'wix-data';

$w.onReady( () => {
 if(wixUsers.currentUser.loggedIn) {
    $w("#addtowishlist").label = "ADD TO WISH LIST";
 else {
    $w("#addtowishlist").label = "SIGN IN TO SAVE";
} );

export function addtowishlist_onclick() {
    {wishlist_item: $w('#Itemdetails').getCurrentItem()._id}),
    $w('#success').show(),  //These are extra lines in case you have buttons or other
    $w('#addtowishlist').hide(),  //These are extra lines in case you have buttons or other
    $w('#viewlist').show();  //These are extra lines in case you have buttons or other


by Code Queen

Stuck on a project? Hire Code Queen, LLC!

Schedule a phone call or video call directly online. In a different time zone? No problem! Code Queen currently has clients around the world.

Online Booking: Discovery Session

Contact Form: Send project details

204 views0 comments

Recent Posts

See All


a quick note about our website content

Our free and premium content is non-exclusive, meaning you are not the only one with access to the content. You can customize our content to fit your end product. Redistribution of our content is strictly prohibited. This means you cannot make our content available to others as-is, stand-alone products or stock products in ANY LANGUAGE, regardless if you offer our content for free or not.

  • Code Queen Facebook Group Icon
  • Facebook Logo
  • Twitter Logo
  • YouTube logo
  • Instagram Logo
  • Linkedin Logo

© 2021.  All Rights Reserved by Code Queen, LLC.