Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / All Other Contributions/Addons / POSM Stock issue

POSM Stock issue

Started by strelitzia on 19 Dec 2024, 3:53 PM · Views: 1,793

Results 1 to 13 of 13
19 Dec 2024, 3:53 PM
#1
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

POSM Stock issue

Site is running Zen Cart 2.0.1 and has POSM v5.0.0

I've noticed that when a variant is set as zero stock in admin it doesn't display as Out Of Stock on the store side.
@lat9 - Is this normal behaviour for POSM?

Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions

19 Dec 2024, 6:45 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: POSM Stock issue

strelitzia:

Site is running Zen Cart 2.0.1 and has POSM v5.0.0

I've noticed that when a variant is set as zero stock in admin it doesn't display as Out Of Stock on the store side.
@lat9 - Is this normal behaviour for POSM?
Just checked zc210/POSM-6.0.0 and a 0-stock variant (once all dependent attributes are selected) properly shows out-of-stock.

20 Dec 2024, 12:09 AM
#3
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: POSM Stock issue

"once all dependent attributes are selected" suggested that you have to select a variant before it shows as OOS which wasn't really ideal.
I made a custom function and modified attributes.php instead so that individual variants are marked OOS and the radio button for that variant is disabled.

I'll also check out original functionality when I get chance to set up a ZC210 test environment.

Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions

1 Feb 2025, 10:18 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

Two interesting things with 2.1.0 and POSM

Bootstrap and OPC are current.

First, a new install at enightlightsDOTcom that looks fine on the desktop and all mobile emulators I've tried look fine. But, when I look at the options on a mobile phone (iPhone), it matters not whether you select suncatcher or nightlight, all the options are presented. Granted, you cannot select non-appropriate options but their appearance in the choose dropdown is confusing.

Second, is an update from 1.5.7c to latest 2.1.0 with latest Bootstrap and OPC. When trying to run the SBA to POSM feauture, there are no logs displayed but one is created that states:

[01-Feb-2025 01:25:46 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "POSM_CURRENT_VERSION" in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php:148Stack trace:
#0 /home/topkathe/_test/jetmar_TopK/index.php(28): require()
#1 {main}
  thrown in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php on line 148


[01-Feb-2025 01:25:46 UTC] Request URI: /jetmar_TopK/index.php?cmd=tool_convert_sba2posm, IP address: 216.177.186.199
--> PHP Fatal error: Uncaught Error: Undefined constant "POSM_CURRENT_VERSION" in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php:148
Stack trace:
#0 /home/topkathe/_test/jetmar_TopK/index.php(28): require()
#1 {main}
  thrown in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php on line 148.


[01-Feb-2025 01:25:46 UTC] Request URI: /jetmar_TopK/index.php?cmd=tool_convert_sba2posm, IP address: 216.177.186.199
--> PHP Fatal error: Uncaught Error: Undefined constant "POSM_CURRENT_VERSION" in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php:148
Stack trace:
#0 /home/topkathe/_test/jetmar_TopK/index.php(28): require()
#1 {main}
  thrown in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php on line 148.

If that variable is defined, the next log is:

[01-Feb-2025 04:20:40 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "POSM_CURRENT_UPDATE_DATE" in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php:148
Stack trace:
#0 /home/topkathe/_test/jetmar_TopK/index.php(28): require()
#1 {main}
  thrown in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php on line 148


[01-Feb-2025 04:20:40 UTC] Request URI: /jetmar_TopK/index.php?cmd=tool_convert_sba2posm, IP address: 216.177.186.199
--> PHP Fatal error: Uncaught Error: Undefined constant "POSM_CURRENT_UPDATE_DATE" in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php:148
Stack trace:
#0 /home/topkathe/_test/jetmar_TopK/index.php(28): require()
#1 {main}
  thrown in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php on line 148.


[01-Feb-2025 04:20:40 UTC] Request URI: /jetmar_TopK/index.php?cmd=tool_convert_sba2posm, IP address: 216.177.186.199
--> PHP Fatal error: Uncaught Error: Undefined constant "POSM_CURRENT_UPDATE_DATE" in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php:148
Stack trace:
#0 /home/topkathe/_test/jetmar_TopK/index.php(28): require()
#1 {main}
  thrown in /home/topkathe/_test/zc_plugins/POSM/v6.0.0/admin/tool_convert_sba2posm.php on line 148.

defining both still results in a PBP.

Display logs have to be ferreted from the logs directory as they do not show up in the admin even when turned on

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

3 Feb 2025, 12:34 AM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

Having the same results with 6.1.0

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

11 Feb 2025, 9:46 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

With 6.1.0, I continue to have problems either getting the second item to appear or migrating from SBA.

Is there no location for detailed instructions? Not that I will comprehend, but...

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

12 Feb 2025, 12:58 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: POSM Stock issue

dbltoe:

With 6.1.0, I continue to have problems either getting the second item to appear or migrating from SBA.

Is there no location for detailed instructions? Not that I will comprehend, but...
GitHub updated, see https://github.com/zencart/zencart/issues/6973

12 Feb 2025, 9:11 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

I can report that the changes have fixed all my desktop issues:clap:

We all owe lat9 a lot of gratitude for bringing this to the core.

Our big customer has had problems for years in that they were reusing product IDs thinking they might run out. Over the last three years, we have slowly been fixing non-existant, and missing/deleted options as they showed up in log files. The converter found all the non-existant products and those with missing options in a flash.

Be sure to read the instructions and fix all problems prior to clicking on that submit button.

The only remaining minor glitch is when selecting product options on an iPhone. In my case, and iPhone 16 Pro Max. Note that this does not show up in any of the mobile emulators I've tried.

Re: https://enightlightsDOTcom/index.php?main_page=product_info&cPath=40_44&products_id=78 (replace DOT with . )

First Choose "Suncatcher"

When clicking on Next Choose, the Product Options on a Desktop correctly show "No Suction Cup...) and "Suction Cup...)

On a mobile with Suncatcher chosen for Product Options, pressing Next Choose shows the two suction cup options AND the three options for a nightlight. The extra options appear to be dimmed and clicking on them has no effect. So, it appears that one cannot make a bad option selection. Especially with the options set to required.

The CSS shows the correcct "display: none;" on a desktop but it is not being recognized on the iPhone in portrait or landscape.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

12 Feb 2025, 9:41 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: POSM Stock issue

dbltoe:

I can report that the changes have fixed all my desktop issues:clap:

We all owe lat9 a lot of gratitude for bringing this to the core.

Our big customer has had problems for years in that they were reusing product IDs thinking they might run out. Over the last three years, we have slowly been fixing non-existant, and missing/deleted options as they showed up in log files. The converter found all the non-existant products and those with missing options in a flash.

Be sure to read the instructions and fix all problems prior to clicking on that submit button.

The only remaining minor glitch is when selecting product options on an iPhone. In my case, and iPhone 16 Pro Max. Note that this does not show up in any of the mobile emulators I've tried.

Re: https://enightlightsDOTcom/index.php?main_page=product_info&cPath=40_44&products_id=78 (replace DOT with . )

First Choose "Suncatcher"

When clicking on Next Choose, the Product Options on a Desktop correctly show "No Suction Cup...) and "Suction Cup...)

On a mobile with Suncatcher chosen for Product Options, pressing Next Choose shows the two suction cup options AND the three options for a nightlight. The extra options appear to be dimmed and clicking on them has no effect. So, it appears that one cannot make a bad option selection. Especially with the options set to required.

The CSS shows the correcct "display: none;" on a desktop but it is not being recognized on the iPhone in portrait or landscape.
That's going to be "difficult" for me to debug, since I don't allow any iStuff in my house.

12 Feb 2025, 9:52 PM
#10
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

I tried to give as much information as possible as I was aware of your allergy to all things Apple. :P

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

12 Feb 2025, 10:19 PM
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

My research shows:

Since the issue is specific to iOS (Safari and Chrome on iPad) and works correctly on desktop browsers, the problem is almost certainly related to WebKit rendering quirks or device-specific behavior. By systematically debugging, you should be able to identify and resolve the issue. If the problem persists, consider filing a bug report with WebKit, providing a minimal reproducible example.

I created```
<!DOCTYPE html><html lang="en">

<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Display: None Test</title> <style> .hidden { display: none; } </style> </head> <body> <div class="hidden">This should be hidden.</div> </body> </html> ```as iPhoneTest.html and ran it on both the desktop and iPhone. It successfully hid the text on both.

I will look further into the CSS to make sure there's no display: block applied to the same rule.

I am not familiar with javascript to investigate whether there is a style.display = 'block' messing with it.

All options appreciated.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

12 Feb 2025, 10:42 PM
#12
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

####_custom-forms.scss from bootrap4.6.2 has the custom_select class set to display: inline-block.

Looks like a change will need to be included in POSM's css for mobile.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

28 Feb 2025, 3:48 AM
#13
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,898
Plugin Contributions:
22

Re: POSM Stock issue

I have finally been able to look at the page on an Android device and it is displayed correctly.

I will report the webkit problem with Chrome on a Apple device to Chrome.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com