Jump to content
sooly

What controller is used to display SHORT DESCRIPTION ?

Recommended Posts

Hello,

im trying to make some changes in short description but i can't find which files should i edit.

In long description its ProductController.php but i have no idea how short description is being processed.

Anyone has idea?

Thanks :)

Share this post


Link to post
Share on other sites

It is field description_short in classes\Product.php

Share this post


Link to post
Share on other sites

Thanks for help but thats probably not what im looking for.

In ProductController.php im able to use code for displaying product features:

if (isset($this->product)){
$features = $this->product->getFrontFeatures($this->context->language->id);
$vypis = $features[0]['name']; 
$this->product->description=str_replace("{FEATURE_VAR}","{$vypis}","{$this->product->description}");
}

but in Product.php this doesnt work.

 

Share this post


Link to post
Share on other sites

Where are you doing it in product.php?

Share this post


Link to post
Share on other sites
On 2/7/2019 at 2:39 PM, NemoPS said:

Where are you doing it in product.php?

In "public function validateField".

Should I place it anywhere else ?

Share this post


Link to post
Share on other sites

Can you describe what you need that for?
That function is not the one you want to use, but the best one really depends on where and how you need the information to be retrieved/displayed

Share this post


Link to post
Share on other sites

We have eshop with batteries. We have stored informations like capacity or voltage in features.

I would like to take these features and put them in short description so customer can see it.

Share this post


Link to post
Share on other sites
On 2/13/2019 at 2:49 PM, NemoPS said:

Can you describe what you need that for?
That function is not the one you want to use, but the best one really depends on where and how you need the information to be retrieved/displayed

Would like to put features right as it is on picture .

Bez-názvu-1.jpg

Share this post


Link to post
Share on other sites

You don't need anything extra, why not using the standard block prestashop has? You can style it to a table and just move it around product.tpl

Share this post


Link to post
Share on other sites

We need it in short description because we are exporting XML to google merchant and we have short description blank. So we want to have product featrues there.

Any ideas ? 😕

Share this post


Link to post
Share on other sites

I would re-think the strategy. Eventually what you can do is populate the xml on export by editing the module directly, grabbing the features and writing them to the description field it exports, only. That's how I would go about it.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More