- Posts: 178
- Thank you received: 5
Display options or variants on product listing page
9 years 6 months ago #266638
by alikon1
Display options or variants on product listing page was created by alikon1
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266657
by nicolas
Replied by nicolas on topic Display options or variants on product listing page
Hi,
There is no option to do that for now.
There is no option to do that for now.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266739
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
As I noticed, this is one of the most frequently requested functions on the forum.
it was in your's TODO list 4 yeasr ago
And this function really makes shopping easier and more convenient.
Unfortunately, we are waiting on :whistle:
And this function really makes shopping easier and more convenient.
Unfortunately, we are waiting on :whistle:
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266745
by nicolas
Replied by nicolas on topic Display options or variants on product listing page
Hi,
The first step to make that possible what to completely rewrite the add to cart system. This was done with HikaShop 3.
The next step will be to rewrite completely the variants selection system to be AJAXified. And then we'll be able to add that possibility.
Please understand that such developments are complex and take a lot of time to do it properly.
The first step to make that possible what to completely rewrite the add to cart system. This was done with HikaShop 3.
The next step will be to rewrite completely the variants selection system to be AJAXified. And then we'll be able to add that possibility.
Please understand that such developments are complex and take a lot of time to do it properly.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266881
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
While waiting for the development of this functional, thought about how to temporarily replace it.
Maybe popup window opened when click Choose option. Found this topic.
Tried to do it. But when in this modal window click "Add to cart" - cart module's content doesn't refresh until I refresh page manually.
Is there any solution to this problem?
Maybe popup window opened when click Choose option. Found this topic.
Tried to do it. But when in this modal window click "Add to cart" - cart module's content doesn't refresh until I refresh page manually.
Is there any solution to this problem?
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266883
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
For example, if I will use Dropdown cart type, maybe I can add some javascript to refresh cart content every time click to show cart content?
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266894
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
Also useful. A crutch, but it works at least that way.nicolas wrote:
I was simply saying that the cart module can be refreshed with such javascript.Code:window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');
Please Log in or Create an account to join the conversation.
9 years 6 months ago - 9 years 6 months ago #266904
by nicolas
Replied by nicolas on topic Display options or variants on product listing page
Hi,
That's a goode idea. You can edit the file "cart" of the view "product" and change the code:
You could try this instead:
That's a goode idea. You can edit the file "cart" of the view "product" and change the code:
Code:
$extra_data .= ' onclick="if(window.hikashop.toggleOverlayBlock(\'hikashop_cart_dropdown_'.$module_id.'\')) return false;"';
Code:
$extra_data .= ' onclick="if(window.hikashop.toggleOverlayBlock(\'hikashop_cart_dropdown_'.$module_id.'\')){ window.Oby.fireAjax(\'cart.updated\');return false; }"';
Last edit: 9 years 6 months ago by nicolas.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266910
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
(\'cart.updated\') or get 500 error. When I click on the cart, the content unfolds and immediately folds back.
Is there a difference between
and
?
Install additional joomla module "Perfect Everything in Everyway", place Hikashop full cart into it and add action to it's toggler onclick="window.hikashop.submitCartModule(this, \'hikashop_cart_202\', \'cart\');"
Is there a difference between
Code:
window.hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart');
Code:
window.Oby.fireAjax('cart.updated');
Install additional joomla module "Perfect Everything in Everyway", place Hikashop full cart into it and add action to it's toggler onclick="window.hikashop.submitCartModule(this, \'hikashop_cart_202\', \'cart\');"
Please Log in or Create an account to join the conversation.
9 years 6 months ago - 9 years 6 months ago #266923
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
Can I create additional Popup Product detail page layout (different from usual Product details page)? Want to remove product photo and description from popup.
Popup opens by URL
<a class="modal hikabtn hikacart" rel="{handler: 'iframe', size: {x: 450, y: 480}}" href="/kafe-mariya/product/3239-shashlyk-iz-perepelov/tmpl-component.html" title="Шашлык из ПЕРЕПЕЛОВ" onhover="SqueezeBox.fromElement(this,{parse: 'rel'});return false;">Choose option</a>
Maybe add something to rel or href?
Popup opens by URL
<a class="modal hikabtn hikacart" rel="{handler: 'iframe', size: {x: 450, y: 480}}" href="/kafe-mariya/product/3239-shashlyk-iz-perepelov/tmpl-component.html" title="Шашлык из ПЕРЕПЕЛОВ" onhover="SqueezeBox.fromElement(this,{parse: 'rel'});return false;">Choose option</a>
Maybe add something to rel or href?
Last edit: 9 years 6 months ago by alikon1.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266971
by alikon1
Replied by alikon1 on topic Display options or variants on product listing page
Add to top of /components/com_hikashop/views/product/tmpl/show.php:
To add_to_cart_ajax.php href atribute add ?layout_name=show_popup.
And create this show_popup.php file.
Code:
<?php
$layout = $this->productlayout;
if(!empty($_GET['layout_name'])){$layout = $_GET['layout_name'];}
$this->productlayout = $layout;
?>
And create this show_popup.php file.
Please Log in or Create an account to join the conversation.
9 years 6 months ago #266935
by nicolas
Replied by nicolas on topic Display options or variants on product listing page
Hi,
Ah yes, I had forgotten the backslashes.
And yes, that will also reload the cart dropdown itself when that is triggered. So that won't help. It would require some further modifications in cart.php
fireAjax('cart.updated') will refresh all the carts on the page.
hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart') will submit the data of one cart module and then refresh all the carts on the page so you don't want to use that here since it would remove from the cart the product you just added.
Yes, add an extra parameter to the URL of the link and check for that parameter in the view files of the product page to display or not the elements.
Ah yes, I had forgotten the backslashes.
And yes, that will also reload the cart dropdown itself when that is triggered. So that won't help. It would require some further modifications in cart.php
fireAjax('cart.updated') will refresh all the carts on the page.
hikashop.submitCartModule(this, 'hikashop_cart_<?php echo $module_id; ?>', 'cart') will submit the data of one cart module and then refresh all the carts on the page so you don't want to use that here since it would remove from the cart the product you just added.
Yes, add an extra parameter to the URL of the link and check for that parameter in the view files of the product page to display or not the elements.
Please Log in or Create an account to join the conversation.
Time to create page: 0.324 seconds