I want to make "Website" required on my Affiliate Registration Form, just the same as First Name, Last Name, etc. How do I do this? Where do I go to find the code to edit? But first, is it even possible?

Please help

Code: Select all
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
Code: Select all
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" onsubmit="javascript:if($('input[name=\'website\']').val().length < 4){alert('Website required!');return false;}">
Code: Select all
<td><?php echo $entry_website; ?></td>
Code: Select all
<td><span class="required">*</span> <?php echo $entry_website; ?></td>
Affiliate Website Fix
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Ocmta, by similar processing do you mean, it won't show up when I receive the form or that it won't remain in my Admin Affiliate panel? If it's the latter, I can deal with that. I would just keep an off site database of the list of affiliate/websites. I just wanted a way to be able to view the site to ensure my affiliate banners won't be placed on any websites that violate my policies (like adult sites). Thanks so much for the info!ocmta wrote:First of all, required or not, openCart does not even save affiliate website information. You'll need a fix like the one in the attachment for that.
Then, the easier way to make it required would by editing the template and adding some javascript. Open catalog/view/theme/default/template/affiliate/register.php, find this:and replace with this:Code: Select all
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
Also, to get a star symbol, find:Code: Select all
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" onsubmit="javascript:if($('input[name=\'website\']').val().length < 4){alert('Website required!');return false;}">
and replace with:Code: Select all
<td><?php echo $entry_website; ?></td>
Now, this won't give you similar processing as with other required fields, similar processing would involve adding or changing a lot of code in several different files. With the code above form just won't submit without website.Code: Select all
<td><span class="required">*</span> <?php echo $entry_website; ?></td>
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Thank you so much ocmta! You've solved my issue! I will be purchasing your Customer & Affiliate Combined extension when we get closer to launching. You're an angel!ocmta wrote:It will show up in the form and in admin (with the fix i attached in previous message). By similar processing i just mean error processing - it if they try to submit the form with empty website, it just won't submit, while with other fields, it will submit, but will not save and will reload with error messages under input boxes.
Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot] and 36 guests