Art Zoomin integration

  • Posts: 26
  • Thank you received: 0
12 years 4 months ago #54778

Hi

I am trying to integrate product zoom on the website using the Artetics Module/plugin. So far the only way I can get it to work at all, is to delete my custom product/show.php and use the one supplied by Artetics. If I do this, and try to restyle my product page the way I did previously, I cannot as the product/show.php in version 1.5.8 is nothing like that in 1.5.4 ( my customized version).

How can I edit my product page again? Which file do I need to edit to rearrange my product page the way I like it?

Thanks

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 4 months ago #54826

You will have to restyle the file "show" of the view "product" via the menu Display->Views.

The best of course would be to ask artetics to update their integration in order to use the new "show_block_img" view file that's we include in HikaShop. That way, when you replace it, you still keep all the rest of your product page customizations.

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

  • Posts: 26
  • Thank you received: 0
12 years 4 months ago #55086

I can confirm that the Artetics plugin is now working well with my Hikashop install. Actually it turns out Artetics do use the "show_block_img" view file. And I have now resolved my customization issues. So all is good for product page styling.

One thing I would like to do though is have more control over the zoomin plugin, and have it show only for certain categories whose products really need to be zoomed in ie jewellery, whereas others don't. How could I do that?

Thanks

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 4 months ago #55119

You would have to create a yes/no custom field of the table "product" and then set it for each product.
Then, you could add a simple condition in the show_default view file of the product page so that it uses one or the other show_block_img based on that custom field value for the current product. It should be something like that:
if($this->element->CUSTOM_FIELD_COLUMN_NAME){
$this->setLayout('show_block_img');
}else{
$this->setLayout('show_block_img2');
}
echo $this->loadTemplate();

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

  • Posts: 26
  • Thank you received: 0
12 years 4 months ago #55135

That did sound a bit complex, but it turned out to be reasonably straightforward, and now I have it working on a per product basis, which is brilliant!

Thanks very much!!

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

  • Posts: 26
  • Thank you received: 0
12 years 1 month ago #69299

I'm not sure why, but this is now not working as planned. This how I have implemented the code you gave me and it does work. The problem is if I set the custom field I created to "NO", it still loads the 'show_block_img_zoom' file.

<?php
  if($this->element->image_zoom){
$this->setLayout('show_block_img_zoom');
}else{
$this->setLayout('show_block_img');
}
echo $this->loadTemplate();
  ?>

How can I check it is resetting value to "NO"?

many thanks

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #69471

That's simple. In the values of your custom field, instead of leaving the "value" of the "no" choice empty, you must have written "no" into it. So the check I gave must return always true.
You can change the line:
if($this->element->image_zoom){

to:
if($this->element->image_zoom=='yes'){

so that if "no" is selected that it doesn't match.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum