1.0.9.9 Questions / Comments / Concerns / Feedback

Open to all! Ask other shopowners for help.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by raiwa »

In 1.0.9.8 the product info price module was updated to use:

Code: Select all

      $price = $product->hype_price();
instead of:

Code: Select all

      $price = $product->get('is_special')
             ? sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL,
                 $product->format(),
                 $product->format('price'))
             : sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY,
                 $product->format());
which makes in the language file the following definitions unused:

Code: Select all

  const MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL = '<del>%2$s</del> <span class="productPrice text-danger productSpecialPrice">%1$s</span>';
  const MODULE_CONTENT_PI_PRICE_DISPLAY         = '<span class="productPrice">%s</span>';
So these can be removed.
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

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by raiwa »

There is a glitch in the qty input product info module which breaks the layout. It has a wrong div tag.
In: includes\modules\pi\product_info\templates\tpl_pi_qty_input.php line 32 should be:

Code: Select all

  <span hidden id="spinner-label"><?= PI_QTY_INPUT_BUTTON_TEXT ?></span>
instead of:

Code: Select all

  <span hidden id="spinner-label"><?= PI_QTY_INPUT_BUTTON_TEXT ?></div>
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
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by burt »

I am not here to build for you.
I am here to build with you. Let's help each other.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by raiwa »

Some content width settings in content modules like for example "login form" have been updated in the 1.0.9.8 installation and update scripts to "col-sm-6 offset-sm-3".
Meanwhile the default value in the module is still "col-sm-6 mb-4".
The default values in the modules should be adjusted to match the update/installation values.
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by raiwa »

2 errors found in a live store:
1.
PHP Warning: Trying to access array offset on value of type null in /is/htdocs/xxxxxxxxxxxxxxxxx/includes/system/versioned/1.0.9.3/product_builder.php on line 99
Note that there are all product names filled in, so I do not know where it comes from.
However the following cures it in:
includes\system\override\product_builder.php lin 99:

Code: Select all

      return $GLOBALS['db']->query($sql)->fetch_assoc()['products_name'] ?? '';
2.
PHP Fatal error: Uncaught Error: Undefined constant "PI_GALLERY_ALBUM_NAME" in /templates/default/includes/hooks/shop/product_info/gallery.php:52
This happens when the new pi gallery images module is not installed because no extra images are used or the content gallery images module is used.

The hook should therefore not rely on this language constant.
Last edited by raiwa on Mon Jan 13, 2025 10:11 am, edited 1 time in total.
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
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by ecartz »

raiwa wrote: Fri Dec 20, 2024 12:23 pm Note that there are all product names filled in, so I do not know where it comes from.
It's saying that it can't find that product ID and language ID in the products_description table. Try changing line 99 to

Code: Select all

$product_result = $GLOBALS['db']->query($sql)->fetch_assoc();
if ($product_result) {
  return $product_result['products_name'];
}

error_log("Could not find ['$product_id','$language_id']");
for (debug_backtrace() as $invocation) {
  error_log(print_r($invocation, true));
}
return '';
and see what it produces in the log.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by burt »

raiwa wrote: Fri Dec 20, 2024 12:23 pm 2.
PHP Fatal error: Uncaught Error: Undefined constant "PI_GALLERY_ALBUM_NAME" in /templates/default/includes/hooks/shop/product_info/gallery.php:52
This happens when the new pi gallery images module is not installed because no extra images are used or the content gallery images module is used.

The hook should therefore not rely on this language constant.
TY.
I'll look into this after the weekend.
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by burt »

@raiwa please would you try this (on a test shop, not your customers live shop).

This should work whichever image [layout or content] module is turned on.
Fallback to a language file if none are turned on (which I think is unlikely).

Please report back?
Feel free to make changes and pass back to me for Core.
You do not have the required permissions to view the files attached to this post.
I am not here to build for you.
I am here to build with you. Let's help each other.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by raiwa »

Hi Gary,
I tested it and it works like expected. No errors logged in any possible variations:
- no module installed
- pi module installed
- content module installed
- both modules installed

However I came upon a few more issues:
1. The content module template echoes the $pi_thumb variable twice. Line 20+82 which duplicates the gallery images output.
2. The content module is not splitted and includes all code for the main, gallery images and the modal pop up. Therefore the code in the hook is duplicated and unnecessary if the old content module (includes\modules\content\product_info\cm_pi_gallery.php) is used.
3. If none of the gallery modules is used, the whole hook code could be supressed checking if the pi module or the content module is installed and switched on. On that way the fallback language definitions and hook language file would not be needed.


I attach a modified version with the added check for the supposed case that the content module will be also splitted and needs the hook code in a future version. I also removed the hook language file.
TestingRaiwa.zip
You do not have the required permissions to view the files attached to this post.
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
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.9.9 Questions / Comments / Concerns / Feedback

Post by burt »

TY, much appreciated - any help is golden!

Could you try having just the extra images module installed, without either of the main image modules?
I think it bombs out in this case, though I haven't been able to test on a clean shop...
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply