News:

AbanteCart v1.4.4 is released.

Main Menu
support

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - marktuan

#1
If the form is embedded directly on the product page, you can usually capture the current product URL or product ID when the form is submitted rather than asking the user to enter it.

For example, on the client side, `window.location.href` will give you the current page URL. If you need the product name, it would be better to pass the product ID/name from the product page into a hidden form field and submit it along with the other form data.

In AbanteCart, I'd recommend using the product ID as the reliable value and looking up the product name afterward. URLs and product names can change, while the product ID should remain stable. If you're handling the submission in a controller, you can then use that ID to retrieve the corresponding product information.

Forum Rules Code of conduct
AbanteCart.com 2010 -
Powered by SMFPacks Social Login Mod