[Suggestion] Allow merchants to duplicate menus in the Navigation

Solved

[Suggestion] Allow merchants to duplicate menus in the Navigation

jameshalldev
Shopify Partner
2 1 31

It'd be useful to be able to duplicate a theme's currently live menu, make changes to the duplicate, and when ready, simply switch the two menus over. 

 

Is there any kind of solution that makes this process easy? I currently have to manually rebuild the entire main menu to create an alternative.

Accepted Solution (1)

jameshalldev
Shopify Partner
2 1 31

This is an accepted solution.

Replies 23 (23)

akscai
Excursionist
14 1 8

Looking for the same solution. Shopify, please make it possible to duplicate navigations!

ultrajeb
Visitor
1 0 0

+1 please implement this

Made4Fighters | Fumetsu: Become Unstoppable | Bytomic Martial Arts | No Stink Deodorisers

Will-Woolley
Shopify Partner
3 0 2

We need to have a duplicate menu option too. I have a really busy megamenu on our Flooring Store I have developed out of the standard nav function on Shopify but I need to split test and recreating it will take ages. @Shopify please helppppp!

AlyssaThomas123
Shopify Partner
7 0 9

I too would love this functionality. Creating multiple navigations takes quite a long time for only a small tweak. Would also love to be able to export and upload to other sites!

Notchish
Visitor
1 0 0

Was looking for this too. Can't believe there is no way to do it.

 

This would be so useful for testing out small changes to the menu before publishing to to the live site.

jwdev
Visitor
2 0 4

I have the same issue, having to duplicate an entire menu structure manually so I can tweak it in a test build, takes a very long time, if I could simple duplicate the menu with a new name then start editing it would save me so much time

webdiva
Tourist
4 0 7

Still would love this option. It's a HUGE time sucker every time I have to make a new menu, if I could duplicate it would be amazing. Also showing and hiding certain menu items would be great! 

Theis_Growbix
Shopify Partner
1 0 0

+1 This would be great!

BenjaminWatson
Visitor
1 0 0

+1.   This would be very helpful for testing different approaches quickly.

sensibletools
Tourist
10 0 3

Wow.. how is this not a feature in Shopify in 2023? 

P1Commerce
Shopify Partner
129 17 67

YESSSS.

Appreciate the assistance? Please hit the Like and Accepted Solution buttons.
--
P1 Commerce is your trusted partner for eCommerce growth.
p1commerce.com

Seagods
Tourist
4 0 1

Came here to say the same as everyone else. Why the F is menu duplication not a thing. What would take minutes now takes hours. 

LaVail
Shopify Partner
2 1 1

Still an issue for me in 2024. Does anyone have any apps? Manually recreating navigation is a huge pain.

Windsormen
Tourist
6 0 1

Yes, the option to instantly duplicate menus is much needed.

AlyssaThomas123
Shopify Partner
7 0 9

I am desperate for this feature. Seems like such a simple request given you can duplicate themes, why not also navigation!?

Monica_Tjandra
Visitor
1 0 0

Would love for this feature to be implemented!

Ewald_DENM
Shopify Partner
7 0 2

Check out Menufy (https://getmenufy.com)

You can duplicate menus by copy & pasting or export & importing, plus there's a free tier which should be enough for most Shopify merchants.

This also allows you to copy and paste into the default menus (main-menu) which Shopify does not allow you to delete.

Make sure to backup your menus before you start by exporting them using Menufy.

DENM Digital - Digital Enablement & Strategy
Menufy - The Ultimate Shopify Menu Manager (getmenufy.com)

jameshalldev
Shopify Partner
2 1 31

This is an accepted solution.

Update: This is now doable via Matrixify!

Documentation: https://matrixify.app/documentation/menus/
Tutorials: https://matrixify.app/tutorials/?category=menus

Webstablish
Shopify Partner
72 12 16

Hi @jameshalldev,

 

You can also use MenuQoL for this, which doesn't use import/export but has a built in 'duplicate menu' feature.

MenuQoL: Hide & Copy Menus | Tutorial
- Hide your seasonal menu items instead of throwing them away
- Copy navigation menus to save time

Sharv
Visitor
1 0 0

 

IMG_1079.jpeg

IMG_1080.jpeg

I have been looking for options and it seems MenuQoL provides a great solution to this common issue.

onescales
Shopify Partner
141 3 16

Unfortunately, Shopify does not have this function. You will need to use an app for this.

 

I made a tutorial - https://www.youtube.com/watch?v=K4NOzvmyICU

We Teach Shopify and Solve E-commerce Problems.

Try Out Our Shopify Online Course

See our Youtube Channel for Tutorials - https://www.youtube.com/@onescales

Bababa
Tourist
5 0 4
for duplicate menu python code:

import requests
import json
import time

API_ACCESS_TOKEN = "your_access_token_here" # <-- Replace with your real access token

STORE_DOMAIN = "yourstore.myshopify.com" # <-- Replace with your actual store domain (no https)

GRAPHQL_URL = f"https://{STORE_DOMAIN}/admin/api/2023-04/graphql.json"

RAW_MENU_ID = "197670600890" # <-- Replace with the handle of the menu you want to copy  example: content/menus/197670600890

MENU_GID = f"gid://shopify/Menu/{RAW_MENU_ID}"

HEADERS = {
"Content-Type": "application/json",
"X-Shopify-Access-Token": API_ACCESS_TOKEN,
}

def graphql_request(query, variables=None):
payload = {"query": query, "variables": variables or {}}
response = requests.post(GRAPHQL_URL, headers=HEADERS, json=payload)
if response.status_code == 200:
return response.json()
else:
print("GraphQL error:", response.status_code)
print(response.text)
return None

def get_menu_by_id(menu_gid):
query = """
query getMenu($id: ID!) {
menu(id: $id) {
id
title
handle
items {
title
type
url
resourceId
items {
title
type
url
resourceId
items {
title
type
url
resourceId
}
}
}
}
}
"""
result = graphql_request(query, {"id": menu_gid})
return result.get("data", {}).get("menu")

def transform_items(items):
transformed = []
for item in items:
new_item = {
"title": item["title"],
"type": item["type"],
"url": item["url"]
}
# Include resourceId if present
if "resourceId" in item and item["resourceId"]:
new_item["resourceId"] = item["resourceId"]
# Recursively transform child items
if item.get("items"):
new_item["items"] = transform_items(item["items"])
transformed.append(new_item)
return transformed

def create_menu_with_items(title, handle, items😞
mutation = """
mutation CreateMenu($title: String!, $handle: String!, $items: [MenuItemCreateInput!]!) {
menuCreate(title: $title, handle: $handle, items: $items) {
menu {
id
title
handle
}
userErrors {
field
message
}
}
}
"""
variables = {"title": title, "handle": handle, "items": items}
result = graphql_request(mutation, variables)

print(" Shopify response from menuCreate:")
print(json.dumps(result, indent=2))

if not result or "data" not in result:
return None

errors = result["data"]["menuCreate"]["userErrors"]
if errors:
print(" Shopify returned errors:")
for e in errors:
print(f"- {e['field']}: {e['message']}")
return None

return result["data"]["menuCreate"]["menu"]

def main():
print("Starting menu duplication process...")

# 1. Get the original menu
menu = get_menu_by_id(MENU_GID)
if not menu:
print(f"Error: Menu with ID {RAW_MENU_ID} not found.")
return

# 2. Create new title and handle with timestamp to avoid duplicates
timestamp = int(time.time())
new_title = f"{menu['title']} - Copy"
new_handle = f"{menu['handle']}-copy-{timestamp}"

# 3. Convert menu items to correct format
items_input = transform_items(menu.get("items", []))

print("Sending the following items:")
print(json.dumps(items_input, indent=2))

# 4. Create the new duplicated menu
new_menu = create_menu_with_items(new_title, new_handle, items_input)

# 5. Report result
if new_menu:
print(f"Duplication successful! New menu: {new_menu['title']} (handle: {new_menu['handle']})")
else:
print("Duplication failed.")

if __name__ == "__main__":
main()
input("Press Enter to exit...")

ecomwonk
Visitor
3 0 0

I have created the free tool, that can duplicate the menus within same store with one click.

Free Tool to duplicate the menus: https://ecomwonk.com/shopify-menus-app/
Video guide to use the tool: https://youtu.be/8SiaKHr0CKY?si=mQV-IfNvuBUxv1uP