---
title: How To Hide Codework While Working In A Live Miva Merchant Store
description: We’re going to show you how you can work on code in a live store while hiding your work from the public at large.
image: https://blog.miva.com/hubfs/Blog%20-%20Default%20Featured%20Images/General-Featured-Image-Person-Hands-Writing-Typing-Laptop-Working-Photo-Blog-2520x1592.jpg
---

- [![Miva, Inc logo.](https://www.miva.com/images/logos/miva-type-white.svg)](https://www.miva.com)
- ![White X close button](https://www.miva.com/images/svg/icons/icon-x-white.svg)

- Why Choose Miva
  
    - Solutions
    - [Why Miva Simplify Complexity](https://www.miva.com/why-miva)
    - [Platform Overview A Complete Ecommerce Solution](https://www.miva.com/platform-overview)
    - [Miva Connect Real-time Native Connections](https://www.miva.com/miva-connect)
    - [Vexture AI-powered Product Discovery](https://www.miva.com/vexture)
    - [PageBuilder No-code Page Creation](https://www.miva.com/pagebuilder)
    - [MivaPay Flexible Native Payment Solution](https://www.miva.com/mivapay)
    - Business Type
    - [B2B Robust Business Tools Built-In](https://www.miva.com/b2b-ecommerce)
    - [B2C Designed for Agility](https://www.miva.com/b2c-ecommerce-platform)
    - [Hybrid B2B + B2C, All Managed Together](https://www.miva.com/b2b-dtc-ecommerce-platform)
- [Enterprise](https://www.miva.com/enterprise-ecommerce-platform)
- Resources
  
    - Community
    - [Customer Stories Case Studies and Featured Stores Built With Miva](https://www.miva.com/customer-stories)
    - [Technology Partners An Ecosystem Built for Flexibility](https://www.miva.com/partners)
    - [Agency Partners Helping You Build and Grow](https://www.miva.com/miva-agency-partners)
    - Resources
    - [Resource Center Browse Our Extensive Library](https://www.miva.com/ecommerce-strategy-resource-guides)
    - [Blog Explore Miva Insights on Ecommerce](https://blog.miva.com/)
    - [Documentation Answers for All Your Miva Questions](https://docs.miva.com/)
- [Get Pricing](https://www.miva.com/schedule-demo-admin)

[![Miva, Inc logo.](https://www.miva.com/images/logos/miva-type-white.svg)](https://www.miva.com)

- Why Choose Miva
  
    - Solutions
    - [Why Miva Simplify Complexity](https://www.miva.com/why-miva)
    - [Platform Overview A Complete Ecommerce Solution](https://www.miva.com/platform-overview)
    - [Miva Connect Real-time Native Connections](https://www.miva.com/miva-connect)
    - [Vexture AI-powered Product Discovery](https://www.miva.com/vexture)
    - [PageBuilder No-code Page Creation](https://www.miva.com/pagebuilder)
    - [MivaPay Flexible Native Payment Solution](https://www.miva.com/mivapay)
    - Business Type
    - [B2B Robust Business Tools Built-In](https://www.miva.com/b2b-ecommerce)
    - [B2C Designed for Agility](https://www.miva.com/b2c-ecommerce-platform)
    - [Hybrid B2B + B2C, All Managed Together](https://www.miva.com/b2b-dtc-ecommerce-platform)
  [![](https://www.miva.com/images/webp/apex-stat.webp)](https://www.miva.com/case-studies/apex-tools)
  
  Your Partner for Growth
  
  See how Apex Tool drove a 57% revenue lift with Miva's Vexture® solution.
- [Enterprise](https://www.miva.com/enterprise-ecommerce-platform)
- Resources
  
    - Community
    - [Customer Stories Case Studies and Featured Stores Built With Miva](https://www.miva.com/customer-stories)
    - [Technology Partners An Ecosystem Built for Flexibility](https://www.miva.com/partners)
    - [Agency Partners Helping You Build and Grow](https://www.miva.com/miva-agency-partners)
    - Resources
    - [Resource Center Browse Our Extensive Library](https://www.miva.com/ecommerce-strategy-resource-guides)
    - [Blog Explore Miva Insights on Ecommerce](https://blog.miva.com/)
    - [Documentation Answers for All Your Miva Questions](https://docs.miva.com/)

- [Get Pricing](https://www.miva.com/schedule-demo-admin)
- ![White, three-lined, menu icon.](https://www.miva.com/images/svg/icons/icon-menu.svg)

# How To Hide Codework While Working In A Live Miva Merchant Store

By Miva | September 19, 2011

- [Ecommerce Marketing](https://blog.miva.com/tag/ecommerce-marketing)

![Hands on a laptop](https://blog.miva.com/hubfs/Blog%20-%20Default%20Featured%20Images/General-Featured-Image-Person-Hands-Writing-Typing-Laptop-Working-Photo-Blog-2520x1592.jpg)

### Before You Read On...

See why top ecommerce brands use Miva’s no-code platform to run   
multiple stores, manage massive catalogs, and grow their revenue.

[Book a Demo of Miva](https://www.miva.com/schedule-demo-admin)

 *Today’s blog post comes from Miva Merchant Associate [Web Developer](https://www.miva.com/ecommerce-web-design), Zeph Dumlao*

When developing for a live store, often times that means editing, adding, and/or removing HTML, Javascript, MivaScript, etc. from the store’s page templates. That’s great and all, but sometimes you want to be able to see your work without affecting the live experience of the customers shopping on the site.

We’re going to show you how you can work on code in a live store while hiding your work from the public at large. To do this, you’re first going to need to create a customer account in the store. The idea is to get the code you’re working on to only show in run-time (the part of your store that the customers see) when you are viewing the page while logged in as YOUR customer account.

**To get started, you will need to create a customer account.**

## Creating A Customer Account

- Log into the Admin of your store
- In the Navigational Tree on the left, click  *Add* on the  *Customers*  branch
- Create a new Customer Account. In this example, my account will be called  *Developer.*  Click the  *Update*  button when done.

Once you create a Customer Account, the next step is to find out what the account’s Customer ID Number is. To do this, we need to drop a snippet of code in the Global Header.

- Click your store’s name on the left. This will take you to the *Edit Store* screen. Then click on the *Global Header & Footer* tab.

The snippet of code we are going to insert looks like this:

 

```
 <div style="display:none;">!@! &mvt:global:basket:cust_id;<div>
```

We’re going to place it in the  *Global Header*  at the very top, like so:

**This code snippet allows you to see your customer number.**

 *Update*

Now, let’s go to the run-time portion (the part the customer’s see) of the store. Click on the *View Store*  button on the upper right part of the Admin screen.  
Go to the *Customer Login*  page and sign in as the Customer Account you created.

**Now, sign into your Customer account using the login that you created.**

## Viewing The Source Code Of Your Store Page

Once you are signed in, we need to view the source code of your store page. Right-click the store page and select *View Source* in the context menu.

 **View the source code of your store page**

Skim over the source code, or do a search for the marker code. In this example, I do a search for !@! and find what I’m looking for.

**The source code should contain your customer ID number.**

## Building A Conditional Code Snippet

Now, we’re going to build a conditional snippet of code based off of the customer ID that we acquired . The code to use will look something like this:

 

```
 <mvt:if expr="g.Basket:CUST_ID EQ 2">
        CODE_WORK_ONLY_YOU_WILL_SEE_WHILE_LOGGED_IN
     <mvt:else>
        CODE_THAT_THE_GENERAL_PUBLIC_WILL_SEE
   <mvt:if>
    
```

For the record, here is how this example code breaks down :

**This is how the above code breaks down.**

\*\*Note: You do not need to have an “alternative action” if you do not want to. Omitting this portion then, translates to something like:  
*If “A” is true, do “Y”, otherwise just forget I said anything.* \*\*\*

## The End Results

Back in the Admin of the store, go into the Global Header & Footer section and remove the code we put in there to find out what our customer ID number was. Then paste the example “If statement” from the previous step. Click Update.

Go back to the front end of the store and refresh the screen. When you’re logged in as the customer account you created, you should see **“CODE\_WORK\_ONLY\_YOU\_WILL\_SEE\_WHILE\_LOGGED\_IN”**. When viewing the store while *NOT* logged in, you should see **“CODE\_THAT\_THE\_GENERAL\_PUBLIC\_WILL\_SEE”.**

You can use this coding idea to hide work on little coding changes, or even hide work on entire template revamps.

For instance, if you wanted to redo the layout of your Category Display page, you might go into Pages /edit CTGY /Category Product List Layout and drop this code. You can replace **“CODE\_THAT\_THE\_GENERAL\_PUBLIC\_WILL\_SEE”** with the live version of Product List Layout code (for live viewing), and replace **“CODE\_WORK\_ONLY\_YOU\_WILL\_SEE\_WHILE\_LOGGED\_IN”** with a work-in-progress version of the Product List Layout code.

And there you go… You just added code work to your store where you (and only you) can see it to develop, thereby not affecting the public’s shopping experience whatsoever.

[Back to top](https://blog.miva.com/how-to-hide-codework-while-working-in-a-live-miva-merchant-store#postAnchor)

### Want to read this blog offline?

No worries, download the PDF version now and enjoy your reading later...

Download PDF

![Image of Miva.](https://blog.miva.com/hubfs/Miva%2010/Miva%2010%20Email%20images/miva-logo-square.png) Miva

Miva offers a flexible and adaptable ecommerce platform that evolves with businesses and allows them to drive sales, maximize average order value, cut overhead costs, and increase revenue. Miva has been helping businesses realize their ecommerce potential for over 20 years and empowering retail, wholesale, and direct-to-consumer sellers across all industries to transform their business through ecommerce.

[Visit Website](https://www.miva.com/)

![White Miva, Inc logo.](https://www.miva.com/images/logos/miva-type-white.svg)

Powering the Next Era of Intelligent, Connected Commerce.

[Get Pricing](https://www.miva.com/schedule-demo-admin)

- [![White Facebook logo.](https://www.miva.com/images/svg/icons/icon-white-facebook.svg)](https://www.miva.com/social/facebook)
- [![White X logo.](https://www.miva.com/images/svg/icons/icon-white-x.svg)](https://www.miva.com/social/x)
- [![White LinkedIn logo.](https://www.miva.com/images/svg/icons/icon-white-linkedin.svg)](https://www.miva.com/social/linkedin)
- [![White Instagram logo.](https://www.miva.com/images/svg/icons/icon-white-instagram.svg)](https://www.miva.com/social/instagram)

![Badge displaying that Miva was named Best Ecommerce Platform in 2020 by Vendors In Partnership.](https://www.miva.com/images/badges/best-ecomm-platform-2020.webp)

- Solutions
- [Why Miva](https://www.miva.com/why-miva)
- [Platform Overview](https://www.miva.com/platform-overview)
- [Miva Connect](https://www.miva.com/miva-connect)
- [Vexture](https://www.miva.com/vexture)
- [PageBuilder](https://www.miva.com/pagebuilder)
- [MivaPay](https://www.miva.com/mivapay)
- [MultiStorefront](https://www.miva.com/miva-multistorefront)

- Business Type
- [B2B](https://www.miva.com/b2b-ecommerce)
- [B2C](https://www.miva.com/b2c-ecommerce-platform)
- [Hybrid](https://www.miva.com/b2b-dtc-ecommerce-platform)

- Community
- [Customer Stories](https://www.miva.com/customer-stories)
- [Technology Partners](https://www.miva.com/partners)
- [Agency Partners](https://www.miva.com/miva-agency-partners)
- [Forums](https://www.miva.com/forums/)

- Resources
- [Resource Center](https://www.miva.com/ecommerce-strategy-resource-guides)
- [Blog](https://blog.miva.com/)
- [Documentation](https://docs.miva.com/)
- [App Store](https://apps.miva.com/)
- [Miva Releases](https://www.miva.com/product-releases)

- Compare Miva
- [With Shopify](https://www.miva.com/miva-vs-shopify-plus)
- [With BigCommerce](https://www.miva.com/miva-vs-bigcommerce)
- [With Adobe Commerce (Magento)](https://www.miva.com/miva-vs-adobe-commerce-magento)
- [With Salesforce Commerce](https://www.miva.com/miva-vs-salesforce-commerce)

- Company
- [About](https://www.miva.com/company)
- [Leadership](https://www.miva.com/company/leadership)
- [Diversity & Inclusion](https://www.miva.com/company/diversity-inclusion)
- [Careers](https://www.miva.com/company/careers)
- [Press Center](https://www.miva.com/press/)

Copyright © 1997 – 2026 Miva®, Miva Merchant®, MivaPay®, Camp Miva®, Miva Connect®, Vexture®, Miva, Inc. All Rights Reserved. Terms & Policies

- [Privacy Policy](https://www.miva.com/privacy)
- [Cookie Policy](https://www.miva.com/cookie-policy)
- [Job Applicants Privacy](https://www.miva.com/miva-applicant-privacy-notice)
- [Intellectual Property](https://www.miva.com/intellectualproperty)
- [Terms of Service](https://www.miva.com/pdf/SaaS_TOS.pdf)
- [Non-Compliance Policy](https://www.miva.com/miva-software-updates)

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.miva.com/how-to-hide-codework-while-working-in-a-live-miva-merchant-store#webpage",
  "@type" : "WebPage",
  "description" : "We’re going to show you how you can work on code in a live store while hiding your work from the public at large. ",
  "inLanguage" : "en-US",
  "isPartOf" : {
    "@id" : "https://blog.miva.com/#website"
  },
  "name" : "How To Hide Codework While Working In A Live Miva Merchant Store",
  "url" : "https://blog.miva.com/how-to-hide-codework-while-working-in-a-live-miva-merchant-store"
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "BreadcrumbList",
  "itemListElement" : [ {
    "@type" : "ListItem",
    "item" : "https://www.miva.com/",
    "name" : "Home",
    "position" : 1
  }, {
    "@type" : "ListItem",
    "item" : "https://blog.miva.com/",
    "name" : "Blog",
    "position" : 2
  }, {
    "@type" : "ListItem",
    "item" : "https://blog.miva.com/how-to-hide-codework-while-working-in-a-live-miva-merchant-store",
    "name" : "How To Hide Codework While Working In A Live Miva Merchant Store",
    "position" : 3
  } ]
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Miva",
    "url" : "https://blog.miva.com/author/miva"
  },
  "dateModified" : "1630451607344",
  "datePublished" : "2011-09-19 00:00:00",
  "description" : "We’re going to show you how you can work on code in a live store while hiding your work from the public at large. ",
  "headline" : "How To Hide Codework While Working In A Live Miva Merchant Store",
  "image" : {
    "@type" : "ImageObject",
    "height" : 630,
    "url" : "https://go.miva.com/hubfs/Blog%20-%20Default%20Featured%20Images/General-Featured-Image-Person-Hands-Writing-Typing-Laptop-Working-Photo-Blog-2520x1592.jpg",
    "width" : 1200
  },
  "mainEntityOfPage" : {
    "@id" : "https://blog.miva.com/how-to-hide-codework-while-working-in-a-live-miva-merchant-store#webpage",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "https://www.miva.com/images/new-images/mivainc-logo.png",
      "width" : 300
    },
    "name" : "Miva",
    "url" : "https://www.miva.com/"
  },
  "url" : "https://blog.miva.com/how-to-hide-codework-while-working-in-a-live-miva-merchant-store"
}
```