Hi dear;
I am using version 1.0.8.14 and the latest package of QT Pro
On default install version
1. We add product Shiny Apples to cart with Box 12
2. On shopping_cart.php we click on a product with attributes- Shiny Apples
3. On return to product_info .php Shiny Apples- The defaullt Option Attributes dropdown is selected with 12 but the QT Pro Option Dropdown remains deselected.
Attaching screenshot.
It shows both QTPro Option dropdown on top and default Option/Attribute below it.
Please can you help fix the issue.
Thank you in advance...
Regds./
radhavallabh
QTpro
Option not selecting on return from shopping cart - QTpro
-
- VIP Member
- Posts: 369
- Joined: Tue Oct 27, 2020 4:09 am
- Contact:
Re: Option not selecting on return from shopping cart
This feature is not supported for now in QtPro. I'll have a look and maybe implement it in the next update.
If you wish to try it on your own, have a look into the core module how it is made there.
If you wish to try it on your own, have a look into the core module how it is made there.
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
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- PhoenixCart Developer
- Posts: 1212
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Contact:
Re: Option not selecting on return from shopping cart
I checked the core module dearraiwa wrote:This feature is not supported for now in QtPro. I'll have a look and maybe implement it in the next update.
If you wish to try it on your own, have a look into the core module how it is made there.
Actually it differs completely from qtpro -As the options are being pulled from system/override/qtpro/.... file in qtpro where as the options are build in the core module in the modules/content/products/cm_products_options_attributes.php
So could you guide me if the tpl file which holds the html code for retrieving the option needs to matched or the array build file cm_products_options_attributes.php needs to be matched for fixing it?
Thank you again in advance;
Awaiting your valuable reply;
Regds./
radhavallabh
-
- VIP Member
- Posts: 369
- Joined: Tue Oct 27, 2020 4:09 am
- Contact:
Re: Option not selecting on return from shopping cart
The relevant code in cm_products_attributes.php is line 55-57:
So for the QtPro multiple drop down and stocked option you need to apply this in:
includes\system\override\qtpro\pad_multiple_dropdowns.php line 101 change to:
If you have unstocked options, you'll need to apply this also at least in:
includes\system\override\qtpro\pad_base.php line 200
The other QtPro options would need more complicate modifications which can't be addressed within this support thread.
best wishes
Rainer
Code: Select all
'selection' => is_string($_GET['products_id'])
? $_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$option_id] ?? ''
: '',
includes\system\override\qtpro\pad_multiple_dropdowns.php line 101 change to:
Code: Select all
$selection = is_string($_GET['products_id'])
? $_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$attributes[$o]['oid']] ?? ''
: $attributes[$o]['default'];
$out .= (new Select('id[' . $attributes[$o]['oid'] . ']', array_values($attributes[$o]['ovals']), ['id' => 'option' . $attributes[$o]['oid'], 'onchange' => 'stkmsg(this.form);']))->set_selection($selection)->require();
includes\system\override\qtpro\pad_base.php line 200
The other QtPro options would need more complicate modifications which can't be addressed within this support thread.
best wishes
Rainer
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
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- PhoenixCart Developer
- Posts: 1212
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Contact:
Re: Option not selecting on return from shopping cart
Thank you so much dear!!raiwa wrote:The relevant code in cm_products_attributes.php is line 55-57:So for the QtPro multiple drop down and stocked option you need to apply this in:Code: Select all
'selection' => is_string($_GET['products_id']) ? $_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$option_id] ?? '' : '',
includes\system\override\qtpro\pad_multiple_dropdowns.php line 101 change to:If you have unstocked options, you'll need to apply this also at least in:Code: Select all
$selection = is_string($_GET['products_id']) ? $_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$attributes[$o]['oid']] ?? '' : $attributes[$o]['default']; $out .= (new Select('id[' . $attributes[$o]['oid'] . ']', array_values($attributes[$o]['ovals']), ['id' => 'option' . $attributes[$o]['oid'], 'onchange' => 'stkmsg(this.form);']))->set_selection($selection)->require();
includes\system\override\qtpro\pad_base.php line 200
The other QtPro options would need more complicate modifications which can't be addressed within this support thread.
best wishes
Rainer
I made the given changes to both the files and it is working like a charm for now!!
Will await for the update eagerly..
Very Warm Regds./
radhavallabh
-
- VIP Member
- Posts: 369
- Joined: Tue Oct 27, 2020 4:09 am
- Contact: