Author Topic: Need help removing the URL "prefix" in product description  (Read 749 times)

Offline Pwner

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Need help removing the URL "prefix" in product description
« on: March 08, 2024, 03:23:15 PM »
I apologize if the title is not technically "accurate", I am honestly not very sure how to phrase it or say it.
 
Long story short, anytime I try to make a clickable link within a products description, it will always attach the current host domain/ip to the very beginning. if I were to try and make a link to take a user to "pcgamingwiki.com/wiki/Resident_Evil" it will always turn the link into "192.168.0.XX/cart/pcgamingwiki.com/wiki/Resident_Evil". (This is all being ran locally on an intranet, which is why it gives the local IP). I have tried using "../" at the beginning of the link, but that just helps me remove the subdirectory the store is in(the "cart" folder), and doing it more than once doesn't seem to do anything else lol. (Sorry, I am still new to a lot of this, so idk what information is obvious and what I need to specifically state lol.) I just need help learning where this "function/setting?" is and, if possible, what i can do to turn it off.
I also noticed if I create a link on the top category/menu area, it does not add this prefix, so I know it is possible and I am not just a crazy person lol.

I seriously hope this makes sense, but if I am not being very clear please feel free to ask for any information and I'll gladly provide it. I know this is probably a super tiny thing for some of you web-master types, but for me, this is driving me INSANE lol. Please help!
Thank you :D

Offline Pwner

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Need help removing the URL "prefix" in product description
« Reply #1 on: March 09, 2024, 06:06:08 PM »
I finally figured out the issue, basically I just needed to add the "http://" to the beginning of the link, lol.

Instead of using "    echo '<a href="' . $pcgw_link . '">PC Gaming Wiki Link</a><br>';"
I had to change it into "    echo '<a href="http://' . $pcgw_link . '">PC Gaming Wiki Link</a><br>';"
and now it works exactly how I wanted.
I didn't fully understand what was going on with the code previously, but now that I understand it, the answer seems so obvious lol.

Just posting  my answer on the off-chance a random person gets in the same situation and searches for help :)

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5810
  • Karma: +274/-2
    • View Profile
Re: Need help removing the URL "prefix" in product description
« Reply #2 on: March 11, 2024, 03:28:10 AM »
I finally figured out the issue, basically I just needed to add the "http://" to the beginning of the link, lol.

Instead of using "    echo '<a href="' . $pcgw_link . '">PC Gaming Wiki Link</a><br>';"
I had to change it into "    echo '<a href="http://' . $pcgw_link . '">PC Gaming Wiki Link</a><br>';"
and now it works exactly how I wanted.
I didn't fully understand what was going on with the code previously, but now that I understand it, the answer seems so obvious lol.

Just posting  my answer on the off-chance a random person gets in the same situation and searches for help :)
Thank you

 

Powered by SMFPacks Social Login Mod