Post by Mountune » Wed Apr 25, 2018 7:02 pm

Hello,

So I have managed to remove the link for returns in the "footer" and in "my account" however it still is displayed when you click "order history>view"

Is there a way to remove the icon here (or returns page entirely) and leave just the "reorder" icon?


Picture attached to show what I am after.
Image

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Wed Apr 25, 2018 9:10 pm

IN:

Code: Select all

catalog/view/theme/default/template/account/order_info.tpl
REMOVE:

Code: Select all

 <a href="<?php echo $product['return']; ?>" data-toggle="tooltip" title="<?php echo $button_return; ?>" class="btn btn-danger"><i class="fa fa-reply"></i></a>
And if you want EXACT Infos on such, better mention your OC Version every time ! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Mountune » Fri Apr 27, 2018 9:47 pm

Fantastic, IP_CAM - that worked a treat.

Apologies I forgot the opencart version but to anyone else who finds this - it worked on opencart v2.3.0.2.

----------

Out of interest IP_Cam as I cant message you as its been disabled - I do have 2 follow up questions (1 related and 1 not)


1. Once an order is placed it comes up stating "Your Order is Placed" - "if your purchase has an associated download, you can go to account downloads page to view them" - I have removed the link for downloads and wish to remove this part of the text. Which file is this located in?


2. if I need to change any password within the opencart installation directory there are only 2 files which are shop/admin.php and shop/admin/admin.php which I can fine.. Is there any more where the passwords for database or ftp are stored?

Thanks

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Sat Apr 28, 2018 1:14 am

Question 1:
update: sorry, wrong version checked, but it's placed in the same section + file... 8)
Image
---
Question 2:
Passwords are ONLY stored in the Database, but I did not understand, what you meant...
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Mountune » Sun Apr 29, 2018 6:21 pm

IP_Cam,

Basically I'm trying to duplicate my entire store but none of the threads on the forums seem to work for me.

What I have done so far;

- Created a new database
- Created a new folder named "testingshop"
- Installed a fresh copy of opencart v2.3.0.2
- Downloaded a copy of my actual shops database and renamed it to match the new database
- Changed all /shop to /testingshop within the file and also the database information and FTP information
- Uploaded a copy of all the files from my original shop

However it doesn't appear to be working - When I import the .sql file I get an error :

--
-- Dumping data for table `oc_api`
--

INSERT INTO `oc_api` (`api_id`, `name`, `key`, `status`, `date_added`, `date_modified`) VALUES
(1, 'Default',

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'


Any advice or help? am I making it harder for myself? is there an easier way? I have read various threads where you said you have done it on previous versions following a guide which is no longer hosted and you didn't have to disable any modifications etc


Thanks

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Mon Apr 30, 2018 7:57 am

Well, I would not download a Database, but copy the entire Database Content
into another one, you've created. But IF you only back up a DB, by use of OC Admin, the
CREATE Table Command Lines are not part of a Download, and you cannot
RESTORE the Content into a virgin Database, not already 'containing' the basic OC Structure.
---
Other than that, if you have re-linked your config.php files, and rerouted the .htaccess
( if another Shop resides in a differently named Subdirectory ), it should basically function. But
you should NOT use a newly installed OC Software, but just a full Copy of the existing Shop Software,
since it possibly already contains some extensions, wich are not yet part of a new install. And this Copy
should be not installed, but just uploaded in full, as it comes, by use of FTP, and just modified config-files.
---
Just clear out the vqmod/vqcache/.. content, and the 2 xxx.tmp Files, placed in the
vqmod/.. Directory, if VqMod exists, and the entire Content in the system/storage/modification/..
and ../storage/cache/.. Sections, exept for the index.html file, placed in the modification/.. sub.

But if you use VqMod, you possibly have to re-install VqMod first, after you started the system, by use of
http:// www. yourshop. com/ vqmod/install/index.php
or
http:// www. yourshop. com/ shop/ vqmod/install/index.php
depending on the Shop Directory used. And I am not sure, if latest VqMod Versions still need this install
function, since I use MaxD's VqMod Pro, wich does it all automatically, but does not work with v.2+ Versions,
just to have this mentioned too ... :D

Good Luck ;)
Ernie
But don't ask me anything about API's, I have no knowledge on such.
---
download/file.php?mode=view&id=34566

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Mountune » Mon Apr 30, 2018 9:05 pm

Thanks for the response, I seem to have some issues;

- Firstly under phpmyadmin I have no option to copy. The tabs at the top in order;
Databases > SQL > Status > Export > Import > Variables > Charsets > Engines - However I cant see any option to copy under any of them. I have contacted the host to see if they can assist.

(Trying to export the database via the host control panel not OC Admin, when I edit the file and try to save I cant get it to save as a .sql without removing all formatting and it saves as a .txt)


- There were no .tmp files in the vqmod/.. Directory (2 x php, 2 x cache, 1 x .hta and 1 x .txt only)


- Not sure what .hta you mean? theres a .htaccess.txt in the main directory and a .htaccess under shop/system (but opening it with wordpad theres nothing to edit)

system/storage/modification/ - All files bar index.html deleted
system/storage/modification/storage/cache/ - All files bar index.html deleted

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Tue May 01, 2018 5:05 am

Well, that's, what I meant, the 2 x xxx.cache files, they are called xxx.tmp files, and can be
removed. I only forgot, how they are named... ::)
And if you downloaded the Database, including everthing, it should work as well, if you restore
it's content into a fully virgin DB, and then do, what I said above.
---
But you need to learn a little about .htaccess! If 'extended' by a .txt ending means, that it is inactive,
and this .txt second Extension has only been added, to keep it from working during the installation, and/or
accidentally overwriting an already existing Site .htaccess File, possibly containing important Site Info, such
as a PHP Version set.

But if one does not use SEO Linking, strictly technically at least, this file is not 'required', to make OC work.
Still, it's a very important File. Besides of beeing used to make SEO work, this file is a MUST, since it's the Number 1
place, to store very important Site security-related Code.
---
In addition, an .htaccess file might contain very important Code, to greatly enhance overall OC Performance.
And it 'can' make sure, that a Shop Site can only be 'called' by use of one only 'valid' link, by example, either as
http(s)://shop or then as http(s)://www. shop
This is rather important, to not only make sure, that FontAwesome grafics, used in later OC 2+ Themes, will even
display on the Pages. Wich is a plain Joke, and only raises problems, since Website Testers don't like internal
'Cookie-' Links, but for some unknown to me reason, it's the only way it works ... :'(
Exept for linking it externally, but this also add's to Testsite Complaints, because those files are not compressed,
and therefore lead to nasty Site Tester Comments also...
---
But you can see, by looking at the image below, what difference a well-done .htaccess file makes, I just tested my latest
Test-Version with and without .htaccess, to give you an idea on this. It has been tested by use of this Cat-Link:

Code: Select all

http://www.ebikes.li/shop/index.php?route=product/category&path=17
---
I added my latest .htaccess file in the ZIP, linked below, just make sure, to have the correct

Code: Select all

RewriteBase /
Directory Name added, if you use a shop in a Subdirectory, and change the rewrite Routine, if you
use https. You can find uncounted infos on such by searching Google.

Code: Select all

#Force non www. to http://www. ( needs to be rewritten, if HTTPS is used )
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
---
Good Luck!
Ernie
---
Image
---

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by jessicana » Wed Aug 04, 2021 12:58 pm

When we make the below adjustment on the default theme, do we have to make this change every time we update opencart when a new release is available?
IN:

Code: Select all

catalog/view/theme/default/template/account/order_info.tpl
REMOVE:

Code: Select all

 <a href="<?php echo $product['return']; ?>" data-toggle="tooltip" title="<?php echo $button_return; ?>" class="btn btn-danger"><i class="fa fa-reply"></i></a>

Newbie

Posts

Joined
Mon Jul 26, 2021 3:14 am

Post by jessicana » Thu Aug 05, 2021 12:32 am

How can I modify this without modifying the core theme? Any guidance is highly appreciated.

Newbie

Posts

Joined
Mon Jul 26, 2021 3:14 am

Post by straightlight » Thu Aug 05, 2021 2:27 am

jessicana wrote:
Thu Aug 05, 2021 12:32 am
How can I modify this without modifying the core theme? Any guidance is highly appreciated.
OC version. This could be achieved by using the Event engine from the core or with OCMod / VQMod (Integrated version).

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jessicana » Thu Aug 05, 2021 3:10 am

I am using the latest version v3.0.3.7

Newbie

Posts

Joined
Mon Jul 26, 2021 3:14 am

Post by straightlight » Fri Aug 06, 2021 6:46 am

jessicana wrote:
Thu Aug 05, 2021 3:10 am
I am using the latest version v3.0.3.7
Untested. Replace the XML file inside the extension provided on the above with this one:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Hide Returns</name>
    <version>1.0</version>
    <author>EASTCONN - Paul Colella</author>
    <code>EASTCONN_Hide_Returns_1_0</code>
    <link>http://itproducts.eastconn.org/</link>
    <file path="catalog/view/theme/*/template/common/footer.twig">
        <operation>
            <search><![CDATA[<li><a href="{{ return }}">{{ text_return }}</a></li>]]></search>
            <add position="replace"><![CDATA[]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/account/account.twig">
        <operation>
            <search><![CDATA[<li><a href="{{ reward }}">{{ text_reward }}</a></li>]]></search>
            <add position="replace"><![CDATA[<!--<li><a href="{{ reward }}">{{ text_reward }}</a></li>-->]]></add>
        </operation>
        <operation>
            <search><![CDATA[<li><a href="{{ return }}">{{ text_return }}</a></li>]]></search>
            <add position="replace"><![CDATA[<!--<li><a href="{{ return }}">{{ text_return }}</a></li>-->]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/extension/module/account.twig">
        <operation>
            <search><![CDATA[<a href="{{ address }}" class="list-group-item">{{ text_address }}</a> <a href="{{ wishlist }}" class="list-group-item">{{ text_wishlist }}</a> <a href="{{ order }}" class="list-group-item">{{ text_order }}</a> <a href="{{ download }}" class="list-group-item">{{ text_download }}</a><a href="{{ recurring }}" class="list-group-item">{{ text_recurring }}</a> <a href="{{ reward }}" class="list-group-item">{{ text_reward }}</a> <a href="{{ return }}" class="list-group-item">{{ text_return }}</a> <a href="{{ transaction }}" class="list-group-item">{{ text_transaction }}</a> <a href="{{ newsletter }}" class="list-group-item">{{ text_newsletter }}</a>]]></search>
            <add position="replace"><![CDATA[<a href="{{ address }}" class="list-group-item">{{ text_address }}</a> <a href="{{ wishlist }}" class="list-group-item">{{ text_wishlist }}</a> <a href="{{ order }}" class="list-group-item">{{ text_order }}</a> <a href="{{ download }}" class="list-group-item">{{ text_download }}</a><a href="{{ recurring }}" class="list-group-item">{{ text_recurring }}</a> <!--<a href="{{ reward }}" class="list-group-item">{{ text_reward }}</a>--> <!--<a href="{{ return }}" class="list-group-item">{{ text_return }}</a>--> <a href="{{ transaction }}" class="list-group-item">{{ text_transaction }}</a> <a href="{{ newsletter }}" class="list-group-item">{{ text_newsletter }}</a>]]></add>
        </operation>
    </file>
    <file path="catalog/controller/account/return.php">
        <operation>
            <search><![CDATA[public function index() {]]></search>
            <add position="after"><![CDATA[
			$this->response->redirect($this->url->link('account/return/404', '', true));
			]]></add>
        </operation>
        <operation>
            <search><![CDATA[public function info() {]]></search>
            <add position="after"><![CDATA[
			$this->response->redirect($this->url->link('account/return/404', '', true));
			]]></add>
        </operation>
        <operation>
            <search><![CDATA[public function add() {]]></search>
            <add position="after"><![CDATA[
			$this->response->redirect($this->url->link('account/return/404', '', true));
			]]></add>
        </operation>
        <operation>
            <search><![CDATA[public function success() {]]></search>
            <add position="after"><![CDATA[
			$this->response->redirect($this->url->link('account/return/404', '', true));
			]]></add>
        </operation>
    </file>
    <file path="catalog/view/theme/*/template/account/order_info.twig">
        <operation>
            <search>
                <![CDATA[<a href="{{ product.return }}" data-toggle="tooltip" title="{{ button_return }}" class="btn btn-danger"><i class="fa fa-reply"></i></a></td>]]></search>
            <add position="replace"><![CDATA[]]></add>
        </operation>
    </file>
</modification>

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 66 guests