Extension list

yootheme

ecommerce

joomla

Skip to main content

List of all our extensions

Create an account

Product SKU field returns formatted output instead of plain text

Hi guys,
I noticed that the Product SKU field adds extra markup around the value when retrieved — for example, it wraps it in a <div class="ph-sku"> and even includes a <style> tag like:
Code:
<style> .ph-sku-txt {display: none;} </style>

It’s a small thing, but in a grid view this style block can repeat many times, and more importantly, it prevents me from using the SKU for matching.

I’m trying to use YOOtheme Essentials’ database source to fetch records from an external table where the SKU matches, but since the table stores it as plain text and PCuikit returns it formatted, the “equal to” comparison doesn’t work. :)

Would it be possible to either add a separate “plain SKU” field, or maybe add a parameter to the existing field so we can choose whether to return the formatted or raw value?

Thanks!
Last Edit:5 months 4 weeks ago by keep2000
Last edit: 5 months 4 weeks ago by keep2000.

Please Log in or Create an account to join the conversation.

Replied by JProStudio on topic Product SKU field returns formatted output instead of plain text

Posted 5 months 3 weeks ago #983
This message contains secure information

For urgent help please create a support ticket extensions.joomlapro.com/support/tickets

Please Log in or Create an account to join the conversation.

I also noticed this, and it's quite frustrating to get to the bottom of it in the first place because one would expect just a number or value output, not scripts and html stags which format the layout of the output differently from what is expected.

This issue also affects output of other data by the way, such as for example the "Stock Availability" value.

As a temporary fix I have had to apply a GREP search/replace to the source which looks for any html or script and only leaves the actual data.

Here's the code I put in the "Search" field for the source: 
Code:
/<(script|style)\b[^>]*>.*?<\/\1>|<[^>]+>/is
Leave "Replace" blank, and it should strip any unwanted script or style tags and their contents from the output.

Please Log in or Create an account to join the conversation.

We have added a new param "Raw SKU Value" to the product SKU dynamic content source and updated the package file . So kindly check and confirm. Thank you
 

For urgent help please create a support ticket extensions.joomlapro.com/support/tickets

Please Log in or Create an account to join the conversation.

I'm afraid I can't see that. When I click the Edit icon on the SKU source in my Text element, I see this:
   

Please Log in or Create an account to join the conversation.

You can find the options in Product SKU dynamic content source settings and make sure to install the latest package file. Thank you

For urgent help please create a support ticket extensions.joomlapro.com/support/tickets

Please Log in or Create an account to join the conversation.

Got it, thank you. Yes it shows up now. 👍

Please Log in or Create an account to join the conversation.

Time to create page: 0.328 seconds
Powered by Kunena Forum