Limit short description to specif category(s)

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #129917

From the forums I have figured out how to add a short description for the category pages(s), however I don't want the short description on all category pages. Is there a way to limit the short description to specific category pages?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #129991

Hi,
Can you give us more information about what your really want to do, like some screenshots and links of where you want and where your don't want your category description to show ?
Thank you :).

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #130316

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #130373

Hi,

Sorry but I don't understand.
Have you solved your problem, so in one place the "read more" text is displayed and in the other place the description is shown, or you want the read more at any place ?

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #130411

the first link shows a category view with read more

for the second link, i want just a normal category view without ANY description, just the normal image and title with add to cart button

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #130445

Hi,

I think that you just have to edit the parameters of the associated module of your menu "thermasol", to display a "listing_img_title" instead of "listing_img_desc".

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #130454

Thermasol was already set to image....

The settings you say do not exsist...here are the choices...

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #130798

Hi,

I was respectively talking about "Image and title" and "Image and Description".

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #130881

makes no difference...still doesn't work

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #130915

You had the readmore button ok for the "Mr Steam" menu, right ?
And for the menu "ThermaSol" you just want a classic image and title display, still right ?

Actually, I see that you have changed the "Mr Steam" display" and you have an image and title display instead of having the "Readmore" text.
And you still have the complete description for the "ThermaSol" listing, so I think that you have changed the type of layout fot the wrong menu.

And if you don't see changes, be sure that you are editing the correct module or menu.

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #130920

if you follow the mr steam link, you will see that under the add to cart button it says "read more", this is how it should be.
again, for thermasol i want just the classic image and title
i have changed nothing from what i started with
no matter what layout i chose for thermasol it does not change
i will be happy to provide backend access if you like

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #130944

Yes, thanks to give me backend access through MP ;)

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #131017

Hi,

The problem is: You have used the display "Image and Title" for both categories, so when you have edited the view to add your "Read more" it has edited the "ThermaSol" listing too.

What you had to do is, select "Image and description" listing type for the "Mr Steam" associated module, edit this listing to hide the description and display the "Read more" and use the "Image and title" display for "ThermaSol".
Or you can edit again the view "product / listing_img_title" to improve your changes and not display the description in the listing.

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #131067

I'm sorry, but you still don't seem to understand, so let me try again....

This page is fine..."read more" is below "add to cart button".....
www.plumbingdeals.dreamhosters.com/index...-mr-steam-generators

This how how this page should look...
www.plumbingdeals.dreamhosters.com/index...auna-steam/thermasol

This page should show ONLY image, title, price and cart button...NO description or read more...
www.plumbingdeals.dreamhosters.com/index...thermasol-generators

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #131074

I had understood the problem, and the solution I gave was the correct one.
To have a different display, you have to use different layout.

One with description, and the other one without. Then edit the one with the description to display a read more instead.
By this way you have one listing with "read more" and the other one image and title without any modifications.

Actually I have edited you view (which was the option n°2) to not use the added code for the ThermaSol menu.

The code added is:

$app   = JFactory::getApplication();
$menu   = $app->getMenu();
$activeId = $menu->getActive()->id;
echo $activeId;
if($activeId != '186')
    echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description); 

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #131077

Thank you, that's fine but does not answer or solve my original question.

mr steam and thermasol were the examples. i have several dozen categories and want read more in some but not others...

for example, this category should not have description or read more...
www.plumbingdeals.net/index.php/brizo/ca...ry/127-dream-kitchen

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #131083

So you can manage by categories with the code:

$readMoreCat = array('xx','yy');
$currentCatId = hikashop_getCid('category');
if(in_array($currentCatId,$readMoreCat))
    echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description);

And in the array, replace "xx", "yy" with you categories id, and you can add as many entries as desired

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #131089

in which view

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #131099

In the view "product / listing_img_title", the view that you had already edited.

Replace your code:

echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description);
By:
$readMoreCat = array('xx','yy');
$currentCatId = hikashop_getCid('category');
if(in_array($currentCatId,$readMoreCat))
    echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description);

The following user(s) said Thank You: plumbingdeals

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

  • Posts: 223
  • Thank you received: 1
11 years 7 months ago #131836

finally had a chance to get back to this...
that piece of code was the fix i was looking for...now working perfect
thank you

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

Time to create page: 0.111 seconds
Powered by Kunena Forum