Post by borrie » Wed Jul 27, 2011 4:44 pm

How do i disable affiliate?

It would be nice if this would be an option in the system settings..

I wouldn't like to remove it from the templates..

New member

Posts

Joined
Mon Jan 10, 2011 7:59 pm

Post by crazypetfood » Wed Jul 27, 2011 4:53 pm

borrie wrote:How do i disable affiliate?

It would be nice if this would be an option in the system settings..

I wouldn't like to remove it from the templates..

It is in the admin / extensions / modules section, either unistall it, or click remove option when editing it,

SEO Essex
SEO Services London
Website SEO Essex


New member

Posts

Joined
Sun Jun 12, 2011 5:25 pm

Post by fido-x » Wed Jul 27, 2011 4:54 pm

You can disable the affiliates module in the administration. However, the link in the footer is hard-coded in the template file. To remove it, you will need to edit "catalog/view/theme/YOUR_TEMPLATE/template/common/footer.tpl".

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by crazypetfood » Wed Jul 27, 2011 4:56 pm

fido-x wrote:You can disable the affiliates module in the administration. However, the link in the footer is hard-coded in the template file. To remove it, you will need to edit "catalog/view/theme/YOUR_TEMPLATE/template/common/footer.tpl".

silly me, I forgot to mention that :p

SEO Essex
SEO Services London
Website SEO Essex


New member

Posts

Joined
Sun Jun 12, 2011 5:25 pm

Post by borrie » Wed Jul 27, 2011 5:02 pm

Ok thx for the fast replies! already deleted the module, so i will delete the line inside template. thx

New member

Posts

Joined
Mon Jan 10, 2011 7:59 pm

Post by bwp » Tue Feb 21, 2012 9:05 am

This seems to remove the link to the affiliate page but if a user knows the path to the affiliates pages they seem to still be able to visit them. NOTE: I'm using 1.5.1.3 of opencart.

Ex: I know that affiliates lives at "/index.php?route=affiliate/login" how do I keep a knowledgeable user from accessing this.

I would think that there's a way to remove the "route" for this and others through the admin, does anyone have any experience with this? I don't know the system well enough to feel comfortable to hack around to do this.

Any ideas?

bwp
Newbie

Posts

Joined
Tue Feb 21, 2012 9:00 am

Post by marcemarc » Tue Apr 10, 2012 8:55 am

I've just come across the same issue for the time being I've pasted:

<?php

header( 'Location: http://www.yourshopsiteurl.com/' ) ;

?>

into the top of the affiliate/login.tpl template, to redirect any users trying to login and access the affiliate pages back to the homepage.

Newbie

Posts

Joined
Tue Apr 10, 2012 8:53 am

Post by boletus » Wed Apr 11, 2012 11:47 pm

Is this really the simplest way to disable a module? And hard-coded links? Naughty ... ;)

Newbie

Posts

Joined
Wed Apr 11, 2012 1:33 am

Post by sparkdigital » Thu May 31, 2012 11:05 pm

I'm having the same issue - I even uninstalled the mod (so not just disabled it) and still it's showing up - how does that work?!?! Should this not just be controlled from the admin panel?

Perhaps something for the next release?

Thanks!

Konrad

Newbie

Posts

Joined
Sat Aug 13, 2011 10:39 pm

Post by avanmedia » Tue Jul 10, 2012 10:44 pm

Building up on marcemarc and crazypetfood's suggestions (thanks!):

1. Find catalog\view\theme\default\template\affiliate\login.tpl
2. Add this to the top of the document:

<?php header( 'Location: index.php?route=common/home' ) ; ?>

3. Find catalog\view\theme\default\template\common\footer.tpl
4. Delete this line:

<li><a href="<?php echo $affiliate; ?>"><?php echo $text_affiliate; ?></a></li>

This should do the trick. If anybody knows a better way, please share!

Newbie

Posts

Joined
Tue Jul 10, 2012 10:36 pm

Post by athalon7 » Sun Aug 05, 2012 4:47 am

Thanks for this.

New member

Posts

Joined
Thu Jun 14, 2012 12:12 pm

Post by javabean » Sun Sep 02, 2012 7:24 am

Found this VQmod that does the trick nicely:

http://www.opencart.com/index.php?route ... on_id=7300

Newbie

Posts

Joined
Wed Aug 29, 2012 2:11 am

Post by andrewluecke » Wed Feb 13, 2013 8:19 pm

That seems a tad extreme CREATIVEMF (especially for free/open source software you paid $0 for).. I'm sure if you coded a patch, OpenCart would surely accept your patch into the main tree (if the code was good enough).

Unfortunately, there are so many things to do, that not every problem can take precedence, and from experience, even managing bugs can be a nightmare. Also, from experience, some issues which look like minor bugs, sometimes actually require large changes, to be fixed properly (a small issue I debugged once with an NSIS installer for instance, which resulted in an infinite loop ended up in a huge rewrite).

For those who want a better workaround until the guys have time to patch it (or CREATIVEMF patches it), you can use a VQMOD too. That way you also decrease the risk of forgetting to retest after upgrades.

But yes, it would be great if Affiliates is completely disabled when the module isn't active in the future. Its already very quick to get up and running with OpenCart, and with a few bugs sorted out, it could almost be an out-of-the-box experience.


The VQMOD Code (replace the paths to match your theme) is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
        <id>Totally kill Affiliate 5% commission page. Based on code from Mancemark and Fido-x.</id>
        <version>1.1</version>
        <vqmver>2.X</vqmver>
        <author>Andrew Luecke.</author>
        <file name="catalog/view/theme/default/template/affiliate/login.tpl">
                <operation info="Redirect Affiliate page so it cannot be used">
                        <search position="before"><![CDATA[
                        <?php echo $header; ?>
                        ]]></search>
                        <add><![CDATA[
                        <?php header( 'Location: index.php?route=common/home' ) ; ?>
                        ]]></add>
                </operation>
				
        </file>
		<file name="catalog/view/theme/default/template/common/footer.tpl">
                <operation info="Remove link from Footer">
                        <search position="replace"><![CDATA[
                        <li><a href="<?php echo $affiliate; ?>"><?php echo $text_affiliate; ?></a></li>
                        ]]></search>
                        <add><![CDATA[
                        
                        ]]></add>
                </operation>
				
        </file>
</modification>

Newbie

Posts

Joined
Wed Feb 13, 2013 7:48 pm

Post by prolitekeiran » Wed Dec 24, 2014 1:26 pm

Not only that, but simply disabling the module and removing the link in the footer still leaves the page in place! 1.5.6.4

I'm sure there must be some level of no good that someone could get up to on my site by simply going directly to the url...

This definitely should be more intuitive.

I found that a combination of methods worked.

I used the VQmod file downloaded from the link from Javabean worked for me to disable the page, even when I was trying to load that page on its own by URL. However, it didn't remove it from the footer.

That's easily enough taken care of though...

Oddly, when I tried to use the XML from AndrewLoecke, it didn't fix either...

Newbie

Posts

Joined
Wed Nov 12, 2014 4:15 pm
Who is online

Users browsing this forum: Baidu [Spider] and 80 guests