import { Page, Layout, Card, Text, BlockStack, Link } from "@shopify/polaris"; import { TitleBar } from "@shopify/app-bridge-react"; import { useState, useCallback } from "react"; import { authenticate } from "../shopify.server"; export const loader = async ({ request }) => { await authenticate.admin(request); return null; }; const faqs = [ { title: "How do I connect my Turn14 account?", icon: "🔌", content: "Go to the Settings page, enter your Turn14 Client ID and Secret, then click 'Connect Turn14'. A green success indicator will confirm the connection. Your credentials are stored securely in Shopify's encrypted metafields.", }, { title: "Where can I import brands from?", icon: "🏷️", content: "Use the 'Brands' tab in the left sidebar to browse all available Turn14 brands. Check the brands you want to sync, then click 'Save Collections' to create Shopify collections for each selected brand.", }, { title: "How do I sync brand collections and products?", icon: "🔄", content: "In the 'Manage Brands' section, select a brand and click 'Show Products' to load its catalog. Apply fitment filters (Make, stock type, LTL, etc.) then click 'Add Products to Store' to start an import. Watch live progress on the Dashboard page.", }, { title: "Is my Turn14 API key secure?", icon: "🔐", content: "Yes. Credentials are stored using Shopify's encrypted metafield storage, not in plain text or local files. Only your store's Shopify admin can access them.", }, { title: "How do I monitor import progress?", icon: "📊", content: "After starting an import from Manage Brands, head to the Dashboard page in the sidebar. It shows real-time progress: products created, skipped, failed, elapsed time, current product being processed, and a live activity log.", }, { title: "What do the product filters do?", icon: "🔎", content: "Fitment filters let you narrow products by vehicle Make. Additional toggles control Zero Stock (include/exclude), LTL Freight Required, Clearance items, Air Freight Prohibited items, and products with no images — giving you precise control over what gets imported.", }, ]; export default function HelpPage() { const [openIndex, setOpenIndex] = useState(null); const toggle = useCallback((i) => setOpenIndex((p) => (p === i ? null : i)), []); return ( {/* Dark header */}
❓ Help & Documentation
Everything you need to get up and running with Data4Autos × Turn14
{/* FAQ cards */} {faqs.map((faq, index) => { const isOpen = openIndex === index; return (
toggle(index)} style={{ background: isOpen ? "#eff6ff" : "#ffffff", padding: "16px 20px", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", transition: "background 0.2s", }} >
{faq.icon}
{faq.title}
{isOpen && (
{faq.content}
)}
); })}
{/* Contact card */}
📬
Still need help?
Our support team is ready to assist you with any questions about your integration.
support@data4autos.com
); }