[Skip to main content](#vessel-content)

#   meta description in listing table

##

- **[danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")**
- [![danilo87rm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/49989-danilo87rm "View danilo87rm's Profile") Topic Author
- [ Offline](/forum/user/49989-danilo87rm)

Less More

- Posts: 3
- Thank you received: 0
-
-

9 years 6 months ago [\#269094](#269094) by [danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")  *[meta description in listing table](/forum/26-product-category-display/890158-meta-description-in-listing-table#269094 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.7 -- PHP version -- : 5.5 -- Browser(s) name and version -- : opera  hi  i would use meta description for my listing table , i modified show listing&#95;table.php, and work, but if a product dont' have meta description ,i would show description ,  is possible to make it?  thanks")* was created by *[danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")*

-- HikaShop version -- : 2.6
-- Joomla version -- : 3.7
-- PHP version -- : 5.5
-- Browser(s) name and version -- : opera

hi

i would use meta description for my listing table , i modified show listing_table.php, and work, but if a product dont' have meta description ,i would show description ,

is possible to make it?

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTAxNTgtbWV0YS1kZXNjcmlwdGlvbi1pbi1saXN0aW5nLXRhYmxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

9 years 6 months ago -  9 years 6 months ago [\#269098](#269098) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[meta description in listing table](/forum/26-product-category-display/890158-meta-description-in-listing-table#269098 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.7 -- PHP version -- : 5.5 -- Browser(s) name and version -- : opera  hi  i would use meta description for my listing table , i modified show listing&#95;table.php, and work, but if a product dont' have meta description ,i would show description ,  is possible to make it?  thanks")*

Hello,

Why don't use an "***if...else***" in order to add this to your modification.
Something like this can make the trick : Code:

&lt;div class="description"&gt; &lt;?php if (!empty ($meta_description)) { echo $meta_description; } else { echo $description; } ?&gt; ...

Hope this will help you.

Regards

Last edit: 9 years 6 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTAxNTgtbWV0YS1kZXNjcmlwdGlvbi1pbi1saXN0aW5nLXRhYmxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")**
- [![danilo87rm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/49989-danilo87rm "View danilo87rm's Profile") Topic Author
- [ Offline](/forum/user/49989-danilo87rm)

Less More

- Posts: 3
- Thank you received: 0
-
-

9 years 6 months ago -  9 years 6 months ago [\#269194](#269194) by [danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")  Replied by *[danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")* on topic *[meta description in listing table](/forum/26-product-category-display/890158-meta-description-in-listing-table#269194 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.7 -- PHP version -- : 5.5 -- Browser(s) name and version -- : opera  hi  i would use meta description for my listing table , i modified show listing&#95;table.php, and work, but if a product dont' have meta description ,i would show description ,  is possible to make it?  thanks")*

hi

thanks for the reply, i try but he show me meta and description , i want that in listing table i see only meta or only description , if meta was empty show me description, or show me meta_description if was no empty Code:

this is the code for show meta &lt;td class="hikashop_product_description_row"&gt; &lt;span class="hikashop_product_description"&gt; &lt;?php echo preg_replace('#&lt;hr *id="system-readmore" */&gt;.*#is','',$this-&gt;row-&gt;product_meta_description); ?&gt; &lt;/span&gt; &lt;/td&gt;

i try add a class and use if and else but i make an error and don't understand where

Last edit: 9 years 6 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: replay =&gt; reply

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTAxNTgtbWV0YS1kZXNjcmlwdGlvbi1pbi1saXN0aW5nLXRhYmxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

9 years 6 months ago [\#269200](#269200) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[meta description in listing table](/forum/26-product-category-display/890158-meta-description-in-listing-table#269200 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.7 -- PHP version -- : 5.5 -- Browser(s) name and version -- : opera  hi  i would use meta description for my listing table , i modified show listing&#95;table.php, and work, but if a product dont' have meta description ,i would show description ,  is possible to make it?  thanks")*

Hi,

Philip is correct in suggesting to use a if...else condition like explained to do what you want.
So for example, instead of:
$this-&gt;row-&gt;product_meta_description
in your code, you would have:
(empty($this-&gt;row-&gt;product_meta_description)? $this-&gt;row-&gt;product_description : $this-&gt;row-&gt;product_meta_description)

Please understand that customization is outside of the user support. Please contact a developer if you need someone to help you with such customization.

The following user(s) said Thank You: [danilo87rm](/forum/user/49989-danilo87rm "View danilo87rm's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTAxNTgtbWV0YS1kZXNjcmlwdGlvbi1pbi1saXN0aW5nLXRhYmxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
