Digital books (kindle, pdf o epub)

  • Posts: 39
  • Thank you received: 1
9 years 8 months ago #225879

-- url of the page with the problem -- : matarreseditore.it/index.php/categorie/s...odotto/ciao-bella-eb
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.7

Hi,
my site sells paper and digital books.
In the digital version, I would give the possibility to choose whether to download the PDF, the Kindle or ePub.
it's possible?
thank you

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #225881

Hi,

Yes it is possible, you can create a characteristic with the values "PDF", "Kindle" and "ePub" and then create the main product, add the created characteristic, and edit the variants to add the corresponding file per variant.

Here is the characteristics documentation:
www.hikashop.com/support/documentation/i...html#characteristics

The following user(s) said Thank You: leonte54

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

  • Posts: 39
  • Thank you received: 1
9 years 8 months ago #225961

Thank you.
I created the characteristic and it works, but I've customized the page and now when i choose the type of book I've a double customized.
url: matarreseditore.it/index.php/ciao-bella-eb

I'd like to add the icons before the text "PDF, Kindle, ePub".

Attachments:
Last edit: 9 years 8 months ago by leonte54.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #226047

Hi,

You can edit the view "product / show" and replace the line:

if(!empty($this->fields)) {
By:
if(!empty($this->fields) && $variant_name != 'name') {

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

  • Posts: 39
  • Thank you received: 1
9 years 8 months ago #226183

Hi,
in product>show.php i modified this code:

if(!empty($this->fields) && $variant_name != 'show_block_custom_main2') {

because "show_block_custom_main2" is the name of file of new block, but the problem remains.

Last edit: 9 years 8 months ago by leonte54.

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
9 years 8 months ago #226222

Hi,

I would recommend to revert your customizations little by little in product/show and the other view files of the product view until you find the root of the problem.
It can come from a lot of things so it's better to work by elimination.

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

  • Posts: 39
  • Thank you received: 1
9 years 8 months ago #226280

Hi,
to obtain the modification for customized features, I followed your directions when I opened this topic:
www.hikashop.com/forum/product-category-...m-field-product.html

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 8 months ago #226608

Hi,

Okay ; but it does not change the fact that you should perform a backup of your overrides and then remove them little by little.
It is possible that you have an override on an old view and that you need to re-integrate your customization on a more recent version of the view.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 39
  • Thank you received: 1
9 years 8 months ago #226638

Hi,
Could you kindly explain what happens when I select the radio button of the variants?
When I enter the page: matarreseditore.it/index.php/ebooks/p/ciao-bella-eb the view is correct, the problem occurs when I choose the variant.
I tried to go back to the starting code knows "product / show_block_characteristic.php

if ($ this-> params-> get ('characteristic_display')! = 'list') {
echo $ this-> characteristic-> displayFE ($ this-> element, $ this-> params). '</ div>';
return;

but I can not find the file where to make changes

thanks

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
9 years 8 months ago #226674

Hi,

When you change the variant selected, there is some javascript code (from administrator/components/com_hikashop/types/characteristic.php) which will copy the HTML of the different blocks of the new variant (these hidden blocks of data on the page are generated from the show file of the product view) to the main blocks of the product page layout (these blocks of layout are generated from the show_default or show_tabular or show_reverse file of the product view).

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

  • Posts: 39
  • Thank you received: 1
9 years 7 months ago #226802

Hi,
these are the steps to change to get the double table right below the main, I think I did not duplicate anything that was not necessary.

1) - I created a custom field named "variante";

2) - I tried to follow these tips on the topic: www.hikashop.com/forum/product-category-...m-field-product.html

For example, suppose that the field that you want to display separately is called "test", you could add the line:
if($fieldName == 'test') continue;
after the line:
foreach ($this->itemFields as $fieldName => $oneExtraField) {
in show_block_custom_item in order to skip the display of that field in show_block_custom_item.
And then you could copy past the code of that file in show_default and change the line:
if($fieldName == 'test') continue;
to:
if($fieldName != 'test') continue;

in the file "show_block_custom_item" I get no change but in the file "show_block_custom_main" I get what I need.

3) - I duplicated the file "show_block_custom_main" and I called it "show_block_custom_main2", I added in the file "show_block_custom_main"
foreach ($this->fields as $fieldName => $oneExtraField) {
if($fieldName == 'versione') continue;
and in the file "show_block_custom_main2"
foreach ($this->fields as $fieldName => $oneExtraField) {
if($fieldName != 'versione') continue;

4) - In the file product / show_default after the first right table I added
<!-- inizio seconda tabella di destra -->
<div id="hikashop_product_right_part2" class="hikashop_product_right_part2 <?php echo HK_GRID_COL_6; ?>">
   <!-- inizio campi personalizzati -->
	<?php
	if(!empty($this->fields)){
		$this->setLayout('show_block_custom_main2');
		echo $this->loadTemplate();
	}
	?>
    <!-- fine campi personalizzati -->
      </div> 
<!-- fine seconda tabella di destra -->
so everything works great. (see image "variante1.jpg")

5) - if in the files 'show_block_custom_main' and 'show_block_custom_main2' disable code
<?php //echo $this->fieldsClass->getFieldName($oneExtraField);?>
and
<?php //echo $this->fieldsClass->show($oneExtraField,$value); ?>
rightly I get disabling 2 custom blocks (see image variante2.jpg)

6) - if custom blocks are disabled, if I choose a variant, why I visualize all blocks? (see image variante3.jpg).

I hope for your help
thank you

Attachments:

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 7 months ago #226804

Hi,

Please read that documentation page :
www.hikashop.com/support/support/documen...ize-the-display.html

With your modifications ; you broke the page layout and you also broke the page data content.

In HikaShop we provide a working product page and you have the possibility to customize it.
We can't be responsible if you modify that page to remove feature which are used or required by other features.

So if you have questions about customization, you can ask.
But our support are not able to fix your customization ; we can give you advice and tips but there is a limit between support and performing some customisation for your website.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum