| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to link out-of-stock or low-stock items to admin end? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to link out-of-stock or low-stock items to admin end?
Hi,
When we have items that are low in stock or out-of-stock, we can emails to let us know that that item is low or out of stock. In XC5.3, the email contains a link that took us to the Admin Back-end so we can update the quantity, delete, or disable the product. However, we just upgraded to XC5.4, and the link now takes us (unhelpfully) to the customer front-end. What can we do to change it so that it can take us to Admin Back-end, just like how it was with XC5.3? Thank you in advance. John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: How to link out-of-stock or low-stock items to admin end?
You can decorate classes/XLite/View/Product/MailBox.php class and modify
Code:
or Code:
to return admin side url for the product. The way this is now it will almost always return the storefront url because the warning is usually called from the storefront due to product getting low stock after order placement. You can decorate the getProductURL like this Code:
This is untested
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
Re: How to link out-of-stock or low-stock items to admin end?
Hi Steve,
Thank you for that. It is a pity that we don't know what the code is and where it resides in the XC5.3. That code could then be replicated in XC5.4. We will keep looking. Thanks again. Cheers, John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#4
|
|||||||
|
|||||||
Re: How to link out-of-stock or low-stock items to admin end?
Hi,
I'm told that the code that needs to be changed is in /admin.php?target=theme_tweaker_template&template=m ail%2Fcommon%2Flow_limit_warning%2Fbody.twig&inter face=mail&innerInterface=admin (i.e. mail/common/low_limit_warning/body.twig). Below is the current XC5.4 code that takes me to the customer front-end: {{ widget('\\XLite\\View\\Product\\MailBox', product=this.product, productUrlProcessor=this.product_url_processor, amount=this.amount) }} Does anyone know how to change this code to take me to the Admin Back-End? (I'm totally ignorant of code-writing, sorry.) Thank you in advance. Cheers, John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: How to link out-of-stock or low-stock items to admin end?
Don't know if this helps, but in 5.3, that same file looked like this:
Code:
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#6
|
|||||||
|
|||||||
Re: How to link out-of-stock or low-stock items to admin end?
Hi Paul,
Thank you for that. It almost works as shown in the attached screenshot, but the link does not. But really appreciate your help anyhow. Cheers, John
__________________
John XCart Business v.5.4.1.48 |
|||||||
|
|||
X-Cart forums © 2001-2020
|