Monday, November 27, 2023

Creating affiliate links

We want our existing customers to invite new customers and benefit from it. We have to track which new customer was referred to by an existing customer. We can do this by creating affiliate links of the form:
https://yourwebsite.com/registration?ref=userID
Code changes in backend:
  1. After registration, show invitation link on customer page with information text.
  2. On registration form, check ref=userID and after completion of registration, store registered userID in database customer table invitedCustomers column. This column can have multiple userIDs, separated by commas, but cannot have duplicates.
  3. Order data structure: Add referringUserID
  4. On product checkout, if current vendor userID is found in customer table-column invitedUserID, set order referringUserID to that rows userID.

React Native

Implementing the frontend in React Native has the following advantages:

  1. Single frontend code base for IOS mobile, Android mobile and web applications
  2. Single, popular programming language, JavaScript
You have to convert your server backend to API-centric architecture and pass data with JSON. You can use the Laravel framework for API protection, e.g. authentication and rate limiting.

Sunday, November 19, 2023

javascript:void(0)

[GPT4] The javascript:void(0) statement in an HTML anchor tag (<a> tag) serves a specific purpose:

  1. Prevent page navigation
  2. Execute some JavaScript code without causing a page reload or navigation
  3. Maintain link appearance
In Fenumi code, javascript:void(0) is used to apply anchor tag styling and calling a JavaScript function when element is clicked.

Online Marketplace

I am helping with the web application software maintenance of Fenumi, an online marketplace for dress rentals. It is written with PHP. It has the following functionality:

  1. Landing page
  2. Admin page
    1. Accept/reject products
    2. Show invoices
  3. Account pages
    1. Login
    2. Vendor
      1. Add/edit product
      2. Display orders
      3. Messaging with customers
    3. Customer
      1. Messaging with vendors
  4. Product page
  5. Shopping cart
  6. Credit card payment via iyzico
  7. Product search, filter
  8. FAQ
  9. Blog
  10. Desktop and mobile layouts