Theme Blocks - Moving Feature from Block A to Block B

Theme Blocks - Moving Feature from Block A to Block B

znb_djs
Tourist
8 0 2

Hi everyone,

I need help with a custom Shopify block and have two code versions:

  • Code A: Works perfectly on mobile and includes a crucial popup feature. It lacks a proper desktop slider (uses mobile scroll on desktop).
  • Code B: Has the ideal desktop slider functionality (mouse drag, button navigation) but lacks the popup feature from Code A.

My Goal: I'd like to combine these. The primary goal is to integrate the desktop slider from Code B into Code A, ensuring Code A remains a block and keeps all its features (especially popups).

Alternatively, if it's simpler, I'm open to moving the popup feature from Code A into Code B (which already has the desired desktop slider).

Essentially, I'm looking for one consolidated block with:

  • Code A's popup functionality.
  • Code B's desktop slider behavior.

I've attached both "Code A.txt" and "Code B.txt", and here's a link to a test page where you can see both blocks implemented for comparison:

Code A: https://cdn.shopify.com/s/files/1/0644/9168/4040/files/Kod_A.txt?v=1748431640
Code B: https://cdn.shopify.com/s/files/1/0644/9168/4040/files/Kod_B.txt?v=1748431640
Product page link: https://uu4nim6bemad9b7j-64491684040.shopifypreview.com

Could anyone offer guidance on how to best merge these features, or suggest the most straightforward approach?

Thanks for any help!

Reply 1 (1)

websensepro
Shopify Partner
2109 262 313

Hi @znb_djs 

You want to combine:

  • Code A’s popup feature (works well on mobile).

  • Code B’s desktop slider (better for desktop interaction).

Best option:
Start with Code A (since it's already a block and has the popup), and add Code B’s desktop slider logic to it. This keeps the popup working and gives you the desktop slider experience.

If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP