- Posts: 102
- Thank you received: 0
Manufacturer URL in pop-up window
$js='';
if($this->cartCount()!=1 && !empty($url)){
$js = 'window.parent.location = \''.urldecode($url).'\';';
}
$js = '
function hikashopModifyQuantity(id,obj,add,form){
if(add){
add=\'&add=1\';
}else{
add=\'\';
}
var qty=1;
if(obj){
qty=parseInt(obj.value);
}
if(form){
var varform = eval(\'document.\'+form);
if(varform){
varform.submit();
}
}else{
try{
new Ajax(\''.$baseUrl.'product_id=\'+id+\'&quantity=\'+qty+add+\''.$url_itemid.'&return_url='.urlencode(base64_encode(urldecode($url))).'\', { method: \'get\', onComplete: function(result) { var hikaModule = window.document.getElementById(\'hikashop_cart_module\'); if(hikaModule){ hikaModule.innerHTML = result;} '.$js.'}}).request();
}catch(err){
new Request({url:\''.$baseUrl.'product_id=\'+id+\'&quantity=\'+qty+add+\''.$url_itemid.'&return_url='.urlencode(base64_encode(urldecode($url))).'\', method: \'get\', onComplete: function(result) { var hikaModule = window.document.getElementById(\'hikashop_cart_module\'); if(hikaModule){ hikaModule.innerHTML = result;} '.$js.'}}).send();
}
}
return false;
}
';
}
which is the code with the modification from the cart php page. but just the part of the cart.php page relevant to that function.
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
here is the error i get when i try
hikashopUpdateVariant is not defined.
[moreinfo] so right now i am using the handler URL instead of iframe because it says to do that in the joomla docs for an internal page. so with the handler as url the modal closes on submit but the variations dont update.
if i do use an iframe instead then the submit doesnt close the popup but the variation DOES update.
any thoughts?
liz
Please Log in or Create an account to join the conversation.
The popup will close if you do the override properly.
You should create the file templates/YOUR_TEMPLATE/html/hikashop_button.php and create in it the function hikashop_cart_js_render which would return the $js variable.
somthing like that:
<?php
function hikashop_cart_js_render($url){
$js = 'ALL your javascript';
return $js;
}
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
okay i scrapped the js override for simplicity sake. i just changed the original line like you said in cart.php.
i made it an iframe.
the popup loads. the variation works. then when you click submit the cart window loads in the iframe, the iframe does not close...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 102
- Thank you received: 0
Please Log in or Create an account to join the conversation.
I'm trying the same and added this lines in the show_block_dimensions.php (HikaShop 2.0):
JHTML::_('behavior.modal');
echo _('<br />').JText::_('MANUFACTURER').': '.'<a class="modal" rel="{handler: \'iframe\', size: {x: 600, y: 350}}" href="'.hikashop_completeLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$alias.'&Itemid='.$Itemid).'" >'.$manufacturer->category_name.'</a>';
It's working well, but I don't want all my homepage (with the right content in the right place) in the popup-window.
Can you help me that only the content of the manufactures will be displayed in the popup?
Please Log in or Create an account to join the conversation.
category&task=listing&cid=
use:
category&tmpl=component&task=listing&cid=
and that will only display the main area in the popup.
Please Log in or Create an account to join the conversation.
Now it's working right, but one more thing:
Sometimes the content no appears. After opening some pages (home or other product pages) the content appears right in the popup (now only the main area like should be).
This problem had figured also without popup-window (the main area appears without content sometimes).
You have an idea?
Please Log in or Create an account to join the conversation.
Would it be possible to have a screenshot ?
Thanks,
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.
Have you an idea, why this things happen?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Can you try to turn off the SEF in the joomla configuration and see if that helps ?
Can you try to switch your template with the default one and see if that helps ?
Please Log in or Create an account to join the conversation.
But now I've tryed change the SEF in HikaShop and it seams that's worked ... till now.
I can't change the template, because in other templates the parts (modules and so on) no figured. (I would have to installate that all for testing.)
My site is working on XAMPP - I will put all online soon ... and then I will testing more.
Please Log in or Create an account to join the conversation.
www.nicething.de/nicething/index.php/gla...1-black-russian-glas
On the right is the "Brand" Designer-Link. This opened a popup-window with Designer-Details - sometime its working, but not always.
One thing more: If I want buy the product it will figured in the cart. But sometimes I can't open the cart ("Warenkorb" on the top). Offline works, but online its a hazard-thing.
And other thing more:
I want that the delivery costs of every product depended on the weight. I have set various manual shipping methods (e.g. 201gr to 500gr cost 3,50 Euro). If I put a product in the cart, it count automatically the weight and choose the shipping method. Sometimes works a bit, but in the mayor times isn't working right. Also when I delete the product in the cart isn't changing the delivery costs by the new weight.
Probably is too much for this thread. I need a lot of help. Please try it to help me.
All site is only for testing (you will buy nothing
If is better to be logged in you can do it on the top "Mein Konto" with 'guest' and 'pass'
Please Log in or Create an account to join the conversation.
I didn't have special problem with the popup.
About the cart link, it redirect to an HTTPS page which is not supported by the server. You should remove the option in order to stay in HTTP during the checkout (or activate the https for this website).
For the weight problem, we have a plugin named "shipping price per product" which would allow you to specify a shipping price per product.
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.
thanks for the fast reply.
The popup of the "Designer" is a lot of times empty (see actually screenshot). I don't know why. (After clicking some sites is appearing sometimes.)
Thanks for give me the hint to http - I ignored that. Now is working.
About the shipping method:
I don't want a price per product. It would be nice, that I can determinate a weight-"area" e.g. 501g - 2000g will cost 5,50 Euro. Then the amount of the weight of various products count automatically the shipping price (e.g. 150g + 300g + 200g = 650g -> 5,50 Euro).
I 've tryed it (see the attached files) and sometimes it is working a bit - but not sure (you can test it on my site).
Also I have set, one time for testing, the price per product and it dosn't working right too. I think the manual shipping method no is working fine on my site.
Can you help me to solve this two open problems?
Thanks for all!
j.
Please Log in or Create an account to join the conversation.
I found this answer from Nicolas:
"
You can do that with weights:
Set a weight of 1kg for each of your products.
Then, create three manual shipping methods like that:
from 0 to 10.5kg => 3 euros
from 10.5 to 20.5kg => 10 euros
from 20.5 to 50.5kg => 20 euros
"
in this thread:
www.hikashop.com/fr/forum/4-how-to/35442...unt-of-products.html
This is what I want ... only more specific with a own weight each product.
Please Log in or Create an account to join the conversation.
Maybe is the foult in this two changing-buttons in the cart?
Please Log in or Create an account to join the conversation.
If ends with "...tmpl-component" its going right. But if ends with "...tmpl-component?Itemid=468" will be appear empty (see attached screenshot).
Of which depend it on - no idea.
Can you help me, please?
Please Log in or Create an account to join the conversation.