@nicksab, what version of Zen Cart is being used?
Printable View
@nicksab, what version of Zen Cart is being used?
I'm not seeing that issue for the products you posted; what changed?
@nicksab, I've got an update that addresses both issues you'd posted (using short codes in EZ-Pages and the recursion/out-of-memory one).
See the plugin's GitHub repository for the updates: https://github.com/lat9/zen_short_codes
Thank you lat9 for your time and fixing my issues. It is much appreciated
I will give it a try over the weekend
I have another question though and not sure if it is possible:
When using short code, a category /product link is displayed
[zenprod id=XX text="here"] => "here" is displayed as a link
but would it possible to have:
[zenprod id=XX text="here"] => "similar product here" with "here" being the only clickable text
I guess what i am asking is : Would it be possible to display additional , non-clickable text automatically when entering a short code?
Hope this make sense
Thanks again for the amazing work
To cut a long story short and to demonstrate the issue briefly with my custom shortcode....
If in
zc_plugins\ZenShortCodes\v1.0.0\catalog\includes\classes\ShortCodes\zenprod.php
(still using 1.0.0 due to problem reported for 1.1.0).
I add
no problem.Code:$products_model = zen_get_products_model($products_id);
But use this:
and I get an out of memory error.Code:$products_model = zen_get_products_model((int)$_GET['products_id']);
$_GET['products_id'] IS set and is the expected number.
I'm trying to use a shortcode in a product description that references that same product, and wanted to avoid needing to manually pass the id.
(An aside is that on the product_info page this shortcode code is parsed 137 times!)
This is all on a vanilla ZC, php 8.4.5.
While maybe an isoteric anomaly, I was intending to use a shortcode to create a curl request to a manufacturer API to create a link to the manufacturers current documentation, on the product page.
Since that fails with the same memory error, it seemed easier to investigate the GET of the previous post...I don't see why that should be causing a problem...but the ins and outs of the plugin framework are still a bit advanced for me!