Skip to main content

Composition of goods in the product slider...

More
12 years 3 months ago - 12 years 3 months ago #158836 by neviqimka
Hi, please recommend... What is the best option to display composition of goods in the product slider. With help custom fields or with "readmore", or you have a better solution?

1) When I use the custom fields I dont now how to displayed cod of new filed in product slider?
2) When I use "readmore", I dont now how to displayed in slider only text with composition of goods?
Last edit: 12 years 3 months ago by neviqimka.

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

More
12 years 3 months ago #158866 by nicolas
Hi,

Could you provide an example/more information of what you want to do so that we can understand what you need ?

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

More
12 years 3 months ago #158967 by neviqimka
The text of my products contains description and composition. By what method I can display the composition in vertical product slider:

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

More
12 years 3 months ago #159002 by nicolas
Ok. So you want to create a custom product field where you'll be able to enter your composition.
To add it in the slider, you can edit the file listing_slider_vertical of the view product via the menu Display>Views and add such code:
Code:
echo $this->row->CUSTOM_FIELD;
where CUSTOM_FIELD is the column name of your field, instead of the code displaying the description:
Code:
echo preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description);
The following user(s) said Thank You: neviqimka

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

More
12 years 3 months ago #159168 by neviqimka
Thank you very much! :)

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

More
12 years 3 months ago - 12 years 3 months ago #159285 by neviqimka
Can I implement with a custom field the extended desscription? My composition looks like this - "|Green|Black|Mixed| TEA WITH |strawberry|cream|pineapple|papaya | IN |caddy|package|filter|" - It's composition has several parts of the text and links
Last edit: 12 years 3 months ago by neviqimka.

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

More
12 years 3 months ago #159320 by nicolas
Hi,

I'm sorry but I don't understand your question.
What is an extended description ?
What do you mean by your composition example ?
Where you want to change what in the interface ?
Could you maybe do some screenshots with arrows and text explaining what you want exactly so that we can understand the situation and provide a solution ?

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

More
12 years 3 months ago - 12 years 3 months ago #159355 by neviqimka
Sorry :) I need the above custom fields - first custom filed will displayed checkboxes (green, black, mixed...), second custom filed will displayed links (strawberry, cream, pineapple, papaya...), third custom filed will displayed checkboxes too (caddy, package, filter...). And all this custom fields create one description on site and displayed in one sentence. Is this possible in HikaShop?
Last edit: 12 years 3 months ago by neviqimka.

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

More
12 years 3 months ago #159396 by nicolas
Sure. You can just have such code:
echo $this->row->CUSTOM_FIELD1.' TEA WITH '.$this->row->CUSTOM_FIELD2.' IN '.$this->row->CUSTOM_FIELD3;

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

More
12 years 3 months ago - 12 years 3 months ago #159570 by neviqimka
"second custom filed will DISPLAYED LINKS (strawberry, cream, pineapple, papaya...)" - How to create this? Because in checkbox field I can create only checkbox with text value not code. It looks like this - name: strawberry, value:
Code:
<a href="strawberry.html">strawberry</a>
or
Code:
<img src="strawberry.jpg" />
or
Code:
<a href="strawberry.html"><img src="strawberry.jpg" /></a>
Last edit: 12 years 3 months ago by neviqimka.

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

More
12 years 3 months ago #159578 by Xavier
Hi,

You can use translations, for example as value of your checkbox you have "strawberry", put this in upper case:
STRAWBERRY

And then in Configuration > Language, add in the override part:
STRAWBERRY="<a href='strawberry.html'><img src='strawberry.jpg' /></a>"

Simple quotes need to be used inside the translation double quotes else it will break your translations.
The following user(s) said Thank You: neviqimka

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

More
12 years 3 months ago #159722 by neviqimka
It's really interesting solution, thank you :) But it works only on product page, It does not work on product slider when I use code - echo $this->row->CUSTOM_FIELD in template (listing_slider_vertical.php)

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

More
12 years 3 months ago #159935 by Xavier
Hi,

Are you sure that this is the correct used view ? The custom field should be present in "$this->row" object.

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

More
12 years 3 months ago - 12 years 3 months ago #159942 by neviqimka
Sorry but I don't understand what you mean... I use this code in listing_slider_vertical.php:
Code:
<!-- PRODUCT DESCRIPTION --> <div style="text-align:<?php echo $this->align; ?>; overflow:hidden"> <?php echo $this->row->my_field; ?> </div> <!-- EO PRODUCT DESCRIPTION -->
But on slider display only text value without links, all works correct only on product page
Last edit: 12 years 3 months ago by neviqimka.

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

More
12 years 3 months ago #159944 by nicolas
If you used translations, you can directly echo the value of the custom field.
You need to do like that instead:
<?php echo JText::_($this->row->my_field); ?>
The following user(s) said Thank You: neviqimka

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

More
12 years 3 months ago #160047 by neviqimka
Yes now it's works...

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

More
12 years 3 months ago #160556 by neviqimka
Again I have a problem... I slider displayed only one element of field. For example, on product page displayed: strawberry, ananas, apple etc. but in product slider displayed only strawberry :dry:
I use code
Code:
echo JText::_($this->row->my_field);
where "my field" is my alias of field

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

More
12 years 3 months ago #160569 by nicolas
Please provide a screenshot of the options of the custom field and a screenshot of what you entered in the custom field on the product edition page.

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

More
12 years 3 months ago - 12 years 3 months ago #160707 by neviqimka
HikaShop custom fields:

Language Manager > Language Overrides:

Product edit page:

listing_slider_vertical.php:


Result: On product page displayed: strawberry, ananas, apple., but in description of product slider displayed only strawberry
Last edit: 12 years 3 months ago by neviqimka.

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

More
12 years 3 months ago #160764 by Xavier
Hi,

If think that it will require code like:
Code:
echo JText::_(str_replace(',',' ',$this->row->bcompound));

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

Time to create page: 0.421 seconds
Powered by Kunena Forum