Post by Twinsit » Tue Oct 04, 2016 7:47 pm

Hi,

For a client I need to do a modification. The client wants to use the catalog (main site) to show products to the clients in the shop, but would have directly a link to the admin panel. (so that the admin panel opens and the client can change directly the stock or something else). (mainly the stock, because they have also a normal shop, and he would update the stock).

Thanks

Wouter

Newbie

Posts

Joined
Tue Oct 04, 2016 3:49 pm

Post by IP_CAM » Thu Oct 06, 2016 4:08 am

Some extensions exist for such already.
Technically, it could be done, by adding an admin User Group, individually, by defining either GLOBAL
credentials, or then individual access data, allowing them, to use SELECTED Admin Sections, by setting
the RIGHTS for such in the Admin User Group Section.

For this, use this first Code below, unchanged, either as OcMod, or then as VqMod as I do, (VqMOD v.2.6.x!)
to add a nice Admin Link Button onto the product page, visible only for logged-in Admin Users, in the
product.tpl file.
Clicking it will lead the logged Admin User directly to the Admin Section, as linked by Code Default.
See the image below!
---
Edit button in front-end free, it works without a single problem in my OC v.2.2 !
http://www.opencart.com/index.php?route ... n_id=21557
---
likely not, what you need, and just to mention it, a free multi-functional admin edit Extension:
Quik edit all what you want
http://www.opencart.com/index.php?route ... n_id=27312
---
Paid extensions for such:
---
Live edit product cart frontend without admin
http://www.opencart.com/index.php?route ... n_id=25501
---
Product statistics and Edit links in FrontEnd
http://www.opencart.com/index.php?route ... n_id=17036
---
Frontend edit
http://www.opencart.com/index.php?route ... n_id=25342
---
Just be aware, and make sure, that you only allow them, to see and 'handle', what they need to see ! 8)
Ernie

PS. A similar routine, in/for the Default 1.5.6.4 Theme, exists in the free russian OC Shop CMS v.1.5.6.4.1
Just to mention this ! :D OC-2 Theme - v.1.5.6.5 Image just below:

My Github OC Site: https://github.com/IP-CAM
5'600 + 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 thbr02 » Fri Oct 07, 2016 3:30 am

I'm using the first of the extensions in your list. It worked fine but when I started to use SLL connection the link to the Product at admin will fail. The link will be

Code: Select all

https://www.torshammarens.se/vinthundsselar/italienska-vinthundselar/italiensk-vinthundsele.html-3
instead of

Code: Select all

http://www.torshammarens.se/vinthundsselar/italienska-vinthundselar/italiensk-vinthundsele.html-3
This result in a bad admin page with a look like a broken stylesheet. The SLL is not enabled for the whole shop, but just for checkout. Did you change anything to make it work with 2.2?

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by IP_CAM » Fri Oct 07, 2016 4:08 am

I could not help you, when it comes to ssl, I never played yet around with such.
I only see in the extension, that it should be able, to handle both ways.
But if you access the admin section in http:// mode, possibly, this routine likely could be changed
the Uncoder-short-cut way, from:

Code: Select all

if (!$secure) {
$url = $this->domain;
} else {
$url = $this->ssl;
}
to:

Code: Select all

if (!$secure) {
$url = $this->domain;
} else {
$url = $this->domain;
}
in the Extension, to make it work, or then, in reverse, to have 'em both is SSL,
to:

Code: Select all

if (!$secure) {
$url = $this->ssl;;
} else {
$url = $this->ssl;
}
Or then, the controller-link needs to be adapted, by hardcode-linking the admin Site!
That's usually the way, how I find out on such, by simple trail and error ! :D
Let me know!
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + 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 thbr02 » Fri Oct 07, 2016 4:35 am

Thank's! I used this code to force it to not use SLL. It worked just fine. This is a great extension.

Code: Select all

if (!$secure) {
$url = $this->domain;
} else {
$url = $this->domain;
}
Thank you!

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by IP_CAM » Fri Oct 07, 2016 4:53 am

Good for you, all the Best ! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + 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 OSWorX » Fri Oct 07, 2016 11:29 am

A simple

Code: Select all

$url = $this->domain;
is good enough, no need to make a condition.
Last edited by OSWorX on Fri Oct 07, 2016 11:52 am, edited 1 time in total.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by IP_CAM » Fri Oct 07, 2016 11:39 am

I figured, but, that's why I mentioned the Uncoder-short-cut way :D
and since I could not test it, I just wanted to make sure, it works !
Thanks! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + 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 Twinsit » Sun Oct 30, 2016 6:22 pm

Sorry for my late reply, but this worked great! Thanks a lot!

Newbie

Posts

Joined
Tue Oct 04, 2016 3:49 pm
Who is online

Users browsing this forum: No registered users and 11 guests