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,
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".
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!
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
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?
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?
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.
<?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.
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
Perhaps something for the next release?
Thanks!
Konrad
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!
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!
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:
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>
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...
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...
Who is online
Users browsing this forum: Baidu [Spider] and 80 guests