QTpro

QT Pro Options not showing on product in Admin - QTpro

QT Pro Options not showing on product in Admin

by radhavallabh » Thu Jun 16, 2022 8:27 am

Hi Dear;
Using 1.0.8.15 and latest version of QTPro;
I added a track stock option in product attributes;
But when I visit the categories page in admin and chose to edit a product The QT Pro Stock option is not showing up.

Please can you help fix the issue. I already followed all steps given in manual to make sure I am not making any mistake... But still it is not activating on the admin/categories/edit---Product page...

Thank you in advance;
Very Warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 369
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: QT Pro Options not showing on product in Admin

by raiwa » Thu Jun 16, 2022 9:33 am

Oh, yes. I missed that there is a condition for the $product_investigation variable in the catalog hook. As you removed it in the other hook the variable is not defined.

First solution to try:
In: includes\hooks\admin\siteWide\swQtPro.php
Leave the product investigation in place for the actual product:

Code: Select all

  function listen_injectSiteStart() {
    global $product_investigation, $products_attributes_filename, $Admin;

    if ($GLOBALS['PHP_SELF'] == 'catalog.php') {
      //Create the product investigation for this product that are used in this page.
      $product_investigation = (isset($_GET['pID']))? qtpro_doctor_investigate_product($_GET['pID']) : null;
    } 

  }
This shouldn't slow down the page load there. If it does slow down, then do this in:
includes\hooks\admin\catalog\catQtPro.php line 125 change to:

Code: Select all

    if ( 'new_product' === $GLOBALS['action'] ) {
I'm sorry, but I can't give further support for your particular case within the free addon support.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1212
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: QT Pro Options not showing on product in Admin

by radhavallabh » Thu Jun 16, 2022 9:43 am

raiwa wrote:Oh, yes. I missed that there is a condition for the $product_investigation variable in the catalog hook. As you removed it in the other hook the variable is not defined.

First solution to try:
In: includes\hooks\admin\siteWide\swQtPro.php
Leave the product investigation in place for the actual product:

Code: Select all

  function listen_injectSiteStart() {
    global $product_investigation, $products_attributes_filename, $Admin;

    if ($GLOBALS['PHP_SELF'] == 'catalog.php') {
      //Create the product investigation for this product that are used in this page.
      $product_investigation = (isset($_GET['pID']))? qtpro_doctor_investigate_product($_GET['pID']) : null;
    } 

  }
This shouldn't slow down the page load there. If it does slow down, then do this in:
includes\hooks\admin\catalog\catQtPro.php line 125 change to:

Code: Select all

    if ( 'new_product' === $GLOBALS['action'] ) {
I'm sorry, but I can't give further support for your particular case within the free addon support.
Thank you so much dear!!!! It worked out perfectly!! :)
Your support for the addons is the best dear!! Thanx again for building such wonderful addons.....
Very warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 369
Joined: Tue Oct 27, 2020 4:09 am
Contact: