Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2019
    Location
    United States
    Posts
    28
    Plugin Contributions
    0

    Default Newsletter unsubscribe link

    I did a lot of looking around and could not find an answer so here goes nothing:

    I'm customizing my newsletter template and wanted to change the newsletter unsubscribe link into an image rather than a text with a text link attached. Is there any way of doing this? I'm using version 1.5.6c

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,690
    Plugin Contributions
    123

    Default Re: Newsletter unsubscribe link

    You would just update the relevant templates files - do a search for SHOW_NEWSLETTER_UNSUBSCRIBE_LINK.

    In a default version of Zen Cart, using responsive_classic, you would update these three files under the includes/ folder:

    ./modules/sideboxes/information.php
    ./templates/responsive_classic/templates/tpl_modules_mobile_menu.php
    ./templates/template_default/templates/tpl_site_map_default.php
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Sep 2019
    Location
    United States
    Posts
    28
    Plugin Contributions
    0

    Default Re: Newsletter unsubscribe link

    Thank you for your reply and help swguy.

    I forgot to clarify that I'm fixing the newsletter template for emails and not the website only. Will this work for the email as well? Or do I grab this piece of code
    Code:
    '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a>'
    change the necessary information and replace the "$UNSUBSCRIBE_LINK" line in the email template with it?

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,690
    Plugin Contributions
    123

    Default Re: Newsletter unsubscribe link

    That would work. When you say "change the necessary information" - the whole line changes (I guess you still have the opening and closing <a> tag.)

    Remember that text email recipients will still see the old text line for unsubscribe.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Sep 2019
    Location
    United States
    Posts
    28
    Plugin Contributions
    0

    Default Re: Newsletter unsubscribe link

    Thank you! I believe I almost got it, seeing as I was able to remove the text from the html format email. The image shows up and it is linked as I wanted it to be.
    One last problem: I'm not too familiar with PHP, how do I make the unsubscribe link work properly in this format? Would I have to code this line using PHP rather than HTML? How would that look?
    Code:
    <a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '"><img src="/email/image.png"></a>

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,690
    Plugin Contributions
    123

    Default Re: Newsletter unsubscribe link

    <?php echo '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '"><img src="/email/image.png"></a>'; ?>
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,690
    Plugin Contributions
    123

    Default Re: Newsletter unsubscribe link

    ... and when you get that done add an alt tag to your image and close the tag.

    Change
    <img src="/email/image.png">

    to

    <img src="/email/image.png" alt="Unsubscribe from our Email" />
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #8
    Join Date
    Sep 2019
    Location
    United States
    Posts
    28
    Plugin Contributions
    0

    Default Re: Newsletter unsubscribe link

    The code seems to not work. I've fiddled around with it for a bit to see what may have been causing it to not work but nothing I've come up with has worked.
    What has happened instead is the image being visible in the email, not hyperlinked, with the '; ?> part of the code next to the image as plain text.
    I've tested the code with a normal http link to the website and got the same result as above.

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,690
    Plugin Contributions
    123

    Default Re: Newsletter unsubscribe link

    - You need to have closed the PHP block above this code. So you should see
    ?>
    and maybe some plain HTML above this.
    - Is the email in email/image.png?
    - Copy and paste (don't try to retype) this EXACT block:

    Code:
    <?php echo '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '"><img src="email/image.png" alt="Unsubscribe" /></a>'; ?>
    Just tested on my installation, works as expected.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #10
    Join Date
    Sep 2019
    Location
    United States
    Posts
    28
    Plugin Contributions
    0

    Default Re: Newsletter unsubscribe link

    Just to clarify, I'm putting that line of code in email_template_newsletter, correct? I may have been editing the wrong file.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. remove 'Newsletter Unsubscribe' link
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 10 Jun 2011, 02:18 PM
  2. Changing Size of 'Newsletter Unsubscribe' Link
    By jrim in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 26 Apr 2009, 04:55 PM
  3. Newsletter Unsubscribe - Input Box Instead of Profile Link?
    By Sidecutter in forum General Questions
    Replies: 3
    Last Post: 6 Nov 2008, 04:44 AM
  4. Replies: 0
    Last Post: 18 Jun 2007, 04:44 AM
  5. Newsletter Unsubscribe
    By CnTGifts in forum General Questions
    Replies: 4
    Last Post: 9 Apr 2007, 02:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR