How to connect 2 collections to 1 button in a dynamic page?

Hi, everyone.

I’m not a technical person and I have an early project of coffee delivery (ready to drink) Subscriptions (Weekly). We have 11 coffee varieties to offer with different characteristics, prices and other variants. I’ve built a subscription flow usign:

  • 1 Regular page.

  • 2 different dynamic pages with the same prefix (1 Category Page and 1 Item Page).

  • 2 Data Collections with a dataset each (1 with the coffee varieties info and other to collect user’s info).

This to let our users select the size of their subscription (Regular page as pricing section), then select the coffee variety’s subscription (Dynamic Category Page connected to the Varieties collection) and finally request the subscription through a form and show more details of the coffee variety and subscription (Dynamic Item Page with repeater connected to the Varieties collection and a form connected to the empty collection [Request collection] to get user’s info).

My hard issue is in the last Dynamic page (Item Page)… After form and repeater, I have 2 buttons: 1 to submit (and pay latter), and other one to send to PayPal checkout (using PayPal links by products that stays in the Varieties collection) but I want submit form (to the Request collection) too.

I’ve connected this last button to the to Request collection (through dataset2) and the Submit option in the Connect Button Panel but my problem is that I don’t know how to get the product PayPal URL (from the varieties collection) and connect it to the button, while this is connected to the Request collection (through Dataset2) to submit the user’s info.
I illustrate it below:


I’ve tried to find the solution with API functions (like .DynamicDataset, wixData, getCurrentItem, onClick, etc) but I don’t get enough Javascript skills to achieving.

I don’t know if I’m seeing or understanding the problem correctly but I’ve passed 3 days in this and I’ll appreciate your help for .

Thanks!
Victor Romero.