Jump to content

Product Description Short


Claudia M

Recommended Posts

Hi,

I do not use the list view - just the grid view.  I want to put special information in the product description short field. My problem is now that I have enabled this in my skin.content.product file it is showing a small amount of the description on every product - which CC is setup to do.  Is there anyway to NOT have CC do this and if so how?

Thanks in advance!

Claudia

 

I went ahead and created a new database field called description_special and am using that instead of description_short.  I have it setup to use the text editor but is will not keep the styling - just shows text.  How can I fix that?

ALTER TABLE `CubeCart_inventory` CHANGE `description_special` `description_special` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Description Special';

{if $PRODUCT.description_special}
 <div class="row collapse bgw">
 <div class="small-12 medium-12 large-12 columns">

  {$PRODUCT.description_special}
  </div></div>
                {/if}

Thanks, Claudia

Link to comment
Share on other sites

Your grid view is showing the product's description (even if just a small part)? That's odd.

CubeCart's effort at security includes filtering user-supplied form data (even the admin's).

Briefly, CubeCart strips tags from POSTed user-supplied data. However, CubeCart also copies all POSTed data to a RAW array before sanitizing the POST.

If there is data that must not be mangled by the sanitizer, the code that processes the POSTed data must look to the RAW array for that pristine data and database that.

So, we will need to focus on making a small change to the admin script products.index.inc.php.

You can see the essentials of it by examining the code that processes the description and description_short:

Lines 54-56:

    $record = $_POST;
    $record['description'] = $GLOBALS['RAW']['POST']['description'];
    $record['description_short'] = $GLOBALS['RAW']['POST']['description_short'];

Unfortunately, there is no hook we can use shortly after line 54 to add to $record. However, there is a hook at line 391 we can use to update the product record with the special data.

Link to comment
Share on other sites

"Your grid view is showing the product's description (even if just a small part)? That's odd."  Possibily I have my skin/custom product page wrong?  I  don't use the call to action or the horizonal / vertical files

It doesn't bother me to change core files

I think I'm confusing myself now LOL  I put the product description short in my product page.  I showed the styled info I put in the editor just fine.  But If the "short" is left blank then in the product page where I put it shows the beginning of the product description on each product.  So I created a new data field - product_description_special.  This only shows the info I have put in it, but there is no styling, just text.  Upside it only shows in products I have added the info. I just need to know how I can get "special" to keep the styling.  Unless you can think of another way to do this.

I added this as line 57 where you mentioned the above.

$record['description_special'] = $GLOBALS['RAW']['POST']['description_special'];

It looks like this now:

 $record = $_POST;
    $record['description'] = $GLOBALS['RAW']['POST']['description'];
    $record['description_short'] = $GLOBALS['RAW']['POST']['description_short'];
    $record['description_special'] = $GLOBALS['RAW']['POST']['description_special'];
    unset($record['categories'], $record['group'], $record['image']);

It seems to be holding the styling now.  Is that all I need to do?

Thanks so much!

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...