abrir producto en popup / open popup product

  • Posts: 39
  • Thank you received: 1
12 years 1 month ago #67814

necesito que cuando un usuario desee ver un producto desde una categoria al precionar en el titulo del producto o en la imagen del producto, que el producto se abra en popup.
¿como puedo lograr esto?

Google Traslate version wrote: I need that when a user wants to see a product from one category to precionar the product title or image of the product, the product is opened in popup.
How I can accomplish this?


Last edit: 12 years 1 month ago by jchorch.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 1 month ago #67924

You can do like that:
www.hikashop.com/en/forum/4-how-to/42220...d-products-list.html


You will also have to change the line:

$link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway);

to:
$link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&tmpl=component&name='.$this->row->alias.$this->itemid.$this->category_pathway);

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

  • Posts: 39
  • Thank you received: 1
12 years 1 month ago #68093

google translate wrote: hello friend! i put this change but does not achieve the desired result, probably what happened was that fails to express myself properly and I apologize for that.

what I want is that when you click on the image or the title, open the details like this:


(this is modal popup? o what is the technical name?)

but the url must be generated with joomla 2.5, as in this example:



the reasons for I want that are:
1. That Gives Me The Opportunity to Work With The positions of joomla 2.5 from the backend and add modules.
2. Optimizing urls.
3. and the ability to assign a different template to a product from backend joomla 2.5

So, how I can accomplish this?

many thanks for the support! ^ ^


added: the picture number 2 shows the product to a second template that would allow for an appropriate view details of a product.
as the default brings other things like the logo than enough.

for more details, i try Compete against regalameoink.com

Last edit: 12 years 1 month ago by jchorch.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 1 month ago #68181

Hi,

The solution I gave is the correct one for what you want to do.
If it doesn't work, it must be that you did something wrong while trying to implement the solution I gave.

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

  • Posts: 39
  • Thank you received: 1
12 years 1 month ago #68266

google translate wrote: I put that line in views / product / listing_img_title.php and the result is:
webya.com.ar/demo2/mates/7-set-matero-en-ecocuero/tmpl-component.html

that opens in a new window without template
:S

Last edit: 12 years 1 month ago by jchorch.

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

  • Posts: 39
  • Thank you received: 1
12 years 1 month ago #68284

I achieved this with your help!

what I did to achieve open the url in popup product was:

1 - go to view> product / listing_img_title.php

2 - change this:

<!-- PRODUCT NAME -->
<span class="hikashop_product_name">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a class="modal" rel="{handler: 'iframe', size: {x: 850, y: 750}}" href="<?php echo $link;?>" onhover="SqueezeBox.fromElement(this,{parse: 'rel'});return false;">
<?php }
echo $this->row->product_name;
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</span>
<!-- EO PRODUCT NAME -->

and...

<!-- PRODUCT IMG -->
<div style="height:<?php echo $this->image->main_thumbnail_div_y;?>px;text-align:center;clear:both;" class="hikashop_product_image">
<div style="position:relative;text-align:center;clear:both;width:<?php echo $this->image->main_thumbnail_div_x;?>px;margin: auto;" class="hikashop_product_image_subdiv">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a class="modal" rel="{handler: 'iframe', size: {x: 850, y: 750}}" href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>" onhover="SqueezeBox.fromElement(this,{parse: 'rel'});return false;">
<?php }
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
$main_thumb_x = $this->image->main_thumbnail_x;
$main_thumb_y = $this->image->main_thumbnail_y;
$horizontal = '0';
$vertical = -'10';
$this->classbadge->placeBadges($this->image, $this->row->badges, $vertical, $horizontal);
$this->image->main_thumbnail_x = $main_thumb_x;
$this->image->main_thumbnail_y = $main_thumb_y;
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</div>
</div>
<!-- EO PRODUCT IMG -->

and...

i don't touch this line:

$link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway);

because if I edit, open a url "tmpl-component.html" and not the url generated in joomla.

its this ok right?

I only need to assign a different template from joomla backend for products, and then i can use modules in this view popup to add information.

Thanks you!

Last edit: 12 years 1 month ago by jchorch.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 1 month ago #68468

Adding the &tmpl=component in the URL allows joomla to display the product page without all the template around so that it will look good in the popup.

If you really don't want that, you can add replace $this->itemid by '&Itemid=XXX' in that link where XXX is the id of a product page menu created via the menu manager and then assign your special template to that menu.

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

  • Posts: 39
  • Thank you received: 1
12 years 1 month ago #68502

thank you nico! look, i did this:

with features of joomla seo enabled, i created as "homepage" = "com_hikashop» com_hikashop_product_VIEW_DEFAULT_TITLE " this do allowing who "url product" from " HikaShop Content Modules " be short just like "url products" on hikashop category with seo options activated.

and then i used the {loadposition module} (joomla) to call the products within an articles that replace the default categories of hikashop in my project. I do this for working the keywords, template and load modules only from joomla options.

I finally, assign to the "products popup" a different template and a url in joomla, this allow me to include modules them easily from the "backend" in the product popups. for example facebook comments.

then , i create a menu not visible in "frontend" only "backend" with "com_hikashop» com_hikashop_product_VIEW_DEFAULT_TITLE " per product, with the same product alias generated in hikashop and this allows me to assign a different template on" template style "right there in the properties of the menu item.

haha .. much work is likely to you think but it works well.

who you thing about all this? XD

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

Time to create page: 0.056 seconds
Powered by Kunena Forum