AI Operation Scenario | Use DeepSeek AI to generate custom code

At Shoplazza, we believe in empowering merchants with flexible customization options. With DeepSeek AI, store owners can easily generate and edit code for themes, product descriptions, custom pages, and more—enabling greater personalization and functionality. This article introduces the application of AI-generated code, helping you explore its convenience and potential value.

Note

AI-generated code provides a flexible and efficient way to customize your store. However, as it is automatically generated without manual review or debugging, Shoplazza cannot guarantee its accuracy, functionality, or compatibility. We strongly recommend that merchants with coding experience or professional developers review and test the code before implementation, as Shoplazza does not provide support or assume responsibility for AI-generated content.

Generate tables for product descriptions

Adding tables to product descriptions, especially for size charts, is a common requirement. However, since the built-in editor does not support table background color customization, DeepSeek AI allows you to easily generate the necessary HTML code, making the process simple and efficient.

1. Example prompt: "Generate an HTML table with X rows and X columns. Alternate the background color for each row, with the first row in [color] and the second row in [color]."

2. How to apply it: Copy the generated HTML code, click the Source code icon, and paste it into the field. Adjust the content within the table as needed.

Customize payment icons in the footer

Suppose you need to change the payment icons displayed in your store’s footer. In that case, you may have used the guide in Display the logo of the card organization during the application for an Oceanpayment collection account to add them. However, the icon provided in that guide is fixed, meaning manual replacement is required. DeepSeek AI can simplify this process by automating the replacement of payment images.

Note

Compatibility may vary depending on your theme. The Eva theme is used for the example below.

1. Upload the new payment icon: Go to your Shoplazza admin, navigate to Settings > Material Center, upload the new image, and copy the image link.

2. Example prompt: "Replace the Xth image in the following code with this link: [image link]."

3. How to apply it: Use AI to generate updated HTML code. Paste the new code into the Custom Code app  to embed the plug-in, then add it to the end of the page. The Eva theme example is used below.

Optimize product description code

When product descriptions are copied from other sources or imported via third-party apps, unnecessary styles can clutter the code. DeepSeek AI can streamline this for better performance.

1. Example prompt: "Simplify the following code by removing unnecessary styles while keeping the essential formatting: [code content]."

2. How to apply it: Copy the DeepSeek AI-optimized code, replace the old description, and check the display to ensure proper formatting. Click the Source Code icon and paste it into the field.

Create HTML cards for enhanced customization

Shoplazza themes support HTML cards, allowing you to add custom widgets or features. DeepSeek AI can assist in creating these cards to match store needs.

1. Example prompt: "Generate an HTML card for [specific function], including [list of elements required]."

2. How to apply it: Copy the generated code, insert it into the theme’s custom card section, and preview the result.

Insert custom scripts with the Custom Code app

The Custom Code app  allows you to embed scripts for added functionality. DeepSeek AI can help generate commonly used scripts for store customization. The example below demonstrates how to prevent users from right-clicking on your store pages.

1. Example prompt: "Generate HTML and JavaScript code to disable right-click on the page."

2. How to apply it: Copy the generated script, embed it using the Custom Code app, and test the page to ensure the function works.

Add a festive atmosphere to the store

Instead of changing themes for seasonal promotions, you can use DeepSeek AI to generate festive effects.

1. Example prompt: "Generate HTML code to create a [specific effect, e.g., falling snow] on the store page."

2. How to apply it: Copy the generated code, embed it using the Custom Code app, and preview the effect.

Add floating icons for social media links

A floating icon provides quick access to WhatsApp, Facebook, or other platforms.

1. Example prompt: "Generate an HTML floating icon in the lower-left corner that links to [platform]."

2. How to apply it: Copy the generated code, paste it into the store’s custom code section, and test the icon to ensure it redirects correctly.

Generate order validation rules

Certain countries require customers to enter tax or ID numbers when placing orders. To enable this feature, you need to install the Checkout Premium app   from the Shoplazza App Store. DeepSeek AI can help you create custom rules to check if the information entered follows the correct format.

1. Example prompt: "Generate a custom rule to check if the entered information follows the correct format for [specific requirement]."

2. How to apply it: Go to your Shoplazza Admin > Settings > Checkout page. Under the Custom validation and blocking rules section, click Configure now (you will be prompted to install the Checkout Premium app first if it is not installed). Create a new validation rule and paste the DeepSeek AI-generated rule. This means that the validation rule will block inputs that do not conform to the specified regex pattern.

Unlock new customization possibilities with DeepSeek AI

Unlock new possibilities with DeepSeek AI. Whether you want to customize your store layout, enhance product descriptions, or implement advanced features, AI-powered code generation simplifies the process. Since AI-generated code may require adjustments for compatibility, we strongly recommend working with a developer or having coding expertise to fully leverage its potential. By carefully reviewing and testing the code, you can enhance your store’s functionality, improve customer experience, and create a truly unique online presence.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Live chat
Reset