some questions!

  • Posts: 1119
  • Thank you received: 114
9 years 2 weeks ago #220182

Hi,

Up on customization with new template. I would like to have few modifications. Most of them I won't be able to do my self but before I search for someone I would like to now:

1. I have 2 buttons on products listing. One of them shows product page and the second one add product to cart. Is there a way or would it be possible with some php...to add default selected product to cart even if there are characteristics?

2. Is there ordering which would set sold out products to the end?

3. Up on add to wishlist popup is displayed. Right now proceed to wishlist display wishlist in same category/page you are. How can I have some redirect to user control panel>my wishlist and display it there?

4. I have modified product/listing_img_title and added such code to display zoom picture button:

<a rel="{handler: 'iframe', size: {x: 800, y: 900}}" href="/media/com_hikashop/upload/<?php echo ($this->row->file_path); ?>" onclick="SqueezeBox.fromElement(this,{parse: 'rel'});return false;"> <span><i class="fa fa-search-plus"></i></span> </a>
It works well with firefox and on click you have original picture with possibility to zoom in. However with iexplorer it directly opens zoomed in picture. No zoome out or zoom in. How can I have it like with firefox? Or this is something related to iexplorer settings?
Same thing with chrome....

Thanks

Last edit: 9 years 2 weeks ago by Jerome.

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

  • Posts: 1119
  • Thank you received: 114
9 years 2 weeks ago #220241

One more question.
I am trying to use sh404sef but I get double slash generated between category and product. www.mysite.com/categoryname//prodoctname How can I remove it?
Everything is fine if I enter product sef name in hikashop configuration.

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 weeks ago #220361

Hi,

1. For the two buttons ; that is related to your template overrides.
It could be possible to add the add the default variant in the cart but it will requires some PHP code to load the default variant during a product listing. That kind of code is not simple and can't be provided in few minutes.
But it is something which would be improved in the next HikaShop releases.

2. It depends on what information you consider a product "sold out" ; if it's the product quantity or the product sales dates.
If you want custom ordering ; you can still use a product custom field and some "mass actions" in order to modify dynamically the custom field value depending specific rules.

3. The content of the popup is in the view "checkout | notice".
You will be able to change the wishlist link in that view.

4. You need to check your error console in IE ; you might have some javascript issues in the page.
I'll more recommend you to use the HikaShop Popup helper to generate such kind of image popup link ; you so can use another lib than the Mootools SqueezeBox one.

5. I'm not an expert on SH404SEF ; best will be to ask the SH404SEF support team for that.

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: 1119
  • Thank you received: 114
9 years 2 weeks ago #220419

Thank you for replay Jerome!

1. Will it be added soon or its just on todo list?

2. I am using product created, descending ordering. It is all ok but I would like that if one of products fully sold out it would go to the back of the category. Could this be done with custom field and mass action?

3. Will look into this...

4. Added prettyPhoto and it works well.

5. So double slashes is not related to hikashop. That's what I wanted to know.

Kind Regards

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 2 weeks ago #220516

Hi,

1. It won't be in the next version if that's what you're asking. It's on the todo list.

2. You could have two custom fields:
- A one where you store the ordering you want for the product
- B one used for the ordering on the products listing
You could have two mass actions:
- one which would set the value of the ordering of the product in the custom field column A to the custom field B when the quantity is above 0
- one which would st the value 99999 in the custom field column B when the quantity is 0
and have them run every hour with a trigger.
Then, if you were to sort the listing on the custom field B, it would do what you want.

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

  • Posts: 1119
  • Thank you received: 114
9 years 1 week ago #221017

Hi,

Could someone help me to have wishlist button redirect to user cpanel>wishlist?
I have tried some things but it doesn't work.

if($wishlist_id != 0)
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,hikashop_completeLink('cart&task=showcart&cart_id='.$wishlist_id.'&cart_type='.$cart_type.$this->url_itemid),'window.top.location = \''.hikashop_completeLink('cart&task=showcart&cart_id='.$wishlist_id.'&cart_type='.$cart_type.$this->url_itemid).'\';return false;');
		else
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLISTS'),'wishlist',$this->params,hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$this->url_itemid),'window.top.location = \''.hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$this->url_itemid).'\';return false;');
		?>
I know it is related to this code but where and to what I should change?

Many thanks

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 week ago #221042

Hi,

In this code, you can replace "hikashop_completeLink('cart&task=showcart&cart_id='.$wishlist_id.'&cart_type='.$cart_type.$this->url_itemid)" by the full desired url directly in order to have something like:

cho $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,'http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist','window.top.location = \''http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist'\';return false;');
for example.

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

  • Posts: 1119
  • Thank you received: 114
9 years 1 week ago #221144

Thanks Xavier for replay.

I have tried to replace code with this one:

<?php
		if($wishlist_id != 0)
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,'http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist','window.top.location = \''http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist'\';return false;');
		else
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLISTS'),'wishlist',$this->params,'http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist','window.top.location = \''http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist'\';return false;');
		?>

But i get syntax error. Another thing. What if i have multilanguage site? This shouldn't work?

To be clear. The problem i am trying to resolve is that if i am on example mysite.com/clothes/dresses/dress-black and add to wishlist>proceed to wishlist. Wishlist is displayed in first category menu mysite.com/clothes/cart/showcart/cart_type-wishlist with all modules for that category.
I also have minicart/wishlist with proceed to wishlist button. So if page is home and proceed to wishlist, wishlist is displayed between all modules associated to home. Thats why i want to have one url forvthat button.

Last edit: 9 years 1 week ago by kyratn.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 week ago #221156

Hi,

Yes indeed the correct code is:

echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,'http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist','window.top.location = \'http://mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist\';return false;');

If you have multilanguage site, so different urls based on the language it will be better to use translation string like:
echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,JText::_('CUSTOM_WISHLIST_URL'),'window.top.location = \''.JText::_('CUSTOM_WISHLIST_URL').'\';return false;');

And add a translation override:

CUSTOM_WISHLIST_URL=" mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist "

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

  • Posts: 1119
  • Thank you received: 114
9 years 1 week ago #221262

Hi,

Well i used your code and no error but after product added to wishlist it will display product successfully added to cart not to wishlist. Is there anything more should be done?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 week ago #221284

Hi,

This don't seem to be related. Were the popup displaying the correct message before these modifications ?
If it is, so you have edited another part of the code of the view "checkout / notice".

What is your HikaShop version ? We had an issue about that before, but it should be fixed in the latest releases.

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

  • Posts: 1119
  • Thank you received: 114
9 years 1 week ago #221397

Hi,

Here is my full code of checkout/notice.
I did changes on line 44

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.3.2
 * @author	hikashop.com
 * @copyright	(C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
$app = JFactory::getApplication();
$wishlist_id = $app->getUserState( HIKASHOP_COMPONENT.'.wishlist_id','0');
$cart_type = $app->getUserState( HIKASHOP_COMPONENT.'.popup_cart_type','cart');
$app->setUserState( HIKASHOP_COMPONENT.'.popup_cart_type','cart');
?>
<script type="text/javascript">
setTimeout( 'window.parent.hikashop.closeBox()', <?php echo (int)$this->config->get('popup_display_time',2000);?> );
</script>
<?php
if($cart_type == 'cart' || hikashop_loadUser() != null){
?>
<div id="hikashop_notice_box_content" class="hikashop_notice_box_content" >
	<div id="hikashop_notice_box_message" >
		<?php
		if($cart_type == 'wishlist'){
			echo hikashop_display(JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_WISHLIST'),'success',true);
		}else{
			echo hikashop_display(JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_CART'),'success',true);
		}
		?>
	</div>
	<br />
	<div id="hikashop_add_to_cart_continue_div">
		<?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.parent.hikashop.closeBox(); return false;','id="hikashop_add_to_cart_continue_button"'); ?>
	</div>
	<?php if($cart_type == 'wishlist'){ ?>
	<div id="hikashop_add_to_cart_checkout_div">
		<?php
		if($wishlist_id != 0)
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,JText::_('CUSTOM_WISHLIST_URL'),'window.top.location = \''.JText::_('CUSTOM_WISHLIST_URL').'\';return false;');
		else
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLISTS'),'wishlist',$this->params,hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$this->url_itemid),'window.top.location = \''.hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$this->url_itemid).'\';return false;');
		?>
	</div>
	<?php } else{ ?>
	<div id="hikashop_add_to_cart_checkout_div">
		<?php echo $this->cartClass->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'to_checkout',$this->params,hikashop_completeLink('checkout'.$this->url_itemid),'window.top.location=\''.hikashop_completeLink('checkout'.$this->url_itemid).'\';return false;','id="hikashop_add_to_cart_checkout_button"'); ?>
	</div>
	<?php } ?>
</div>
<?php
	}else{
		$app->enqueueMessage(JText::_('LOGIN_REQUIRED_FOR_WISHLISTS'));
	}
?>

It seems pop is good now but url I get is this:

mywebsite.com/category/checkout/notice/c...t/cart_type-wishlist

Quick update about pop up.
With code above if I am logged in pop up is good. If I am NOT logged in it will display product successfully added to cart.
Without any modification of the code it works as it should.

I use latest hikashop business 2.6 which I have downloaded 2-3 weeks ago.

Last edit: 9 years 5 days ago by kyratn.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 days ago #221537

Hi,

Please try with:

CUSTOM_WISHLIST_URL=" mywebsite.com/cpanel/cart/showcarts/cart_type-wishlist "

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

  • Posts: 1119
  • Thank you received: 114
9 years 4 days ago #221590

Hi,

Nope, it's still displays in same category trying access wishlist with url:

mywebsite.com/category/checkout/notice/c...s/cart_type-wishlist

It's just adds custom_wishlist_url at the end....

and pop up is wrong if not logged in with modification.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 days ago #221597

The forum is replacing the "http://" at the beginning of the url automatically and this is causing the issue.
Please add the http:// in the url.

What is your version of HikaShop ? An issue related on the popup should have been corrected in the 2.6.0.

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

  • Posts: 1119
  • Thank you received: 114
9 years 4 days ago #221682

Hi,

Thank you Xavier. It works.

But pop up issue still persist. You can try it here: kyra.lt/flatize/

Right now it has those changes on file checkout/notice....

Changing between languages sometimes first 1-4 popups are good but then again same message that product successfully added to cart.
Even if logged in it gives random popups....

Without any modification on checkout/notice everything works perfect!

I use hikashop 2.6 business version which I have downloaded 2-3 weeks ago!

Last edit: 9 years 4 days ago by kyratn.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 days ago #221725

Hi,

Please use that code:

<?php
$doc = JFactory::getDocument();
$doc->setMetaData( 'robots', 'noindex' );
$app = JFactory::getApplication();
$wishlist_id = $app->getUserState( HIKASHOP_COMPONENT.'.wishlist_id','0');
$cart_type = JRequest::getVar('cart_type','');
if(empty($cart_type))
    $cart_type = $app->getUserState( HIKASHOP_COMPONENT.'.popup_cart_type','cart');
$app->setUserState( HIKASHOP_COMPONENT.'.popup_cart_type','cart');
?>
<script type="text/javascript">
setTimeout( 'window.parent.hikashop.closeBox()', <?php echo (int)$this->config->get('popup_display_time',2000);?> );
</script>
<?php
if($cart_type == 'cart' || hikashop_loadUser() != null){
?>
<div id="hikashop_notice_box_content" class="hikashop_notice_box_content" >
	<div id="hikashop_notice_box_message" >
		<?php
		if($cart_type == 'wishlist'){
			echo hikashop_display(JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_WISHLIST'),'success',true);
		}else{
			echo hikashop_display(JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_CART'),'success',true);
		}
		?>
	</div>
	<br />
	<div id="hikashop_add_to_cart_continue_div">
		<?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.parent.hikashop.closeBox(); return false;','id="hikashop_add_to_cart_continue_button"'); ?>
	</div>
	<?php if($cart_type == 'wishlist'){ ?>
	<div id="hikashop_add_to_cart_checkout_div">
		<?php
		if($wishlist_id != 0)
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLIST'),'wishlist',$this->params,JText::_('CUSTOM_WISHLIST_URL'),'window.top.location = \''.JText::_('CUSTOM_WISHLIST_URL').'\';return false;');
		else
			echo $this->cartClass->displayButton(JText::_('DISPLAY_THE_WISHLISTS'),'wishlist',$this->params,hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$this->url_itemid),'window.top.location = \''.hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$this->url_itemid).'\';return false;');
		?>
	</div>
	<?php } else{ ?>
	<div id="hikashop_add_to_cart_checkout_div">
		<?php
		global $Itemid;
		$url_itemid='';
		//check that the current menu is a HikaShop menu item and remove the Itemid if that's not the case
		if(!empty($Itemid)){
			$menuClass = hikashop_get('class.menus');
			$current_id = $menuClass->loadAMenuItemId('','',$Itemid);
			if($current_id){
				$url_itemid='&Itemid='.$Itemid;
			}
		}
		//if the current itemid is not a HikaShop mneu item load one
		if(empty($url_itemid)){
			$menuClass = hikashop_get('class.menus');
			$random_id = $menuClass->loadAMenuItemId('','');
			if($random_id){
				$url_itemid='&Itemid='.$random_id;
			}
		}
		//try to load the itemid of the checkout from the config in order to directly display the correct link to the checkout
		$itemid_for_checkout = (int)$this->config->get('checkout_itemid','0');
		if(empty($itemid_for_checkout)){
			$menuClass = hikashop_get('class.menus');
			$itemid_for_checkout = $menuClass->getCheckoutMenuIdForURL();
		}
		if(!empty($itemid_for_checkout)){
			$url_checkout = hikashop_completeLink('checkout&Itemid='.$itemid_for_checkout);
		}else{
			$url_checkout = hikashop_completeLink('checkout'.$url_itemid);
		}

		echo $this->cartClass->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'to_checkout',$this->params,$url_checkout,'window.top.location=\''.$url_checkout.'\';return false;','id="hikashop_add_to_cart_checkout_button"'); ?>
	</div>
	<?php } ?>
</div>
<?php
	}else{
		$app->enqueueMessage(JText::_('LOGIN_REQUIRED_FOR_WISHLISTS'));
	}
?>

You were doing the modifications on an old version of the view, so now the modifications are done on the latest one so everything should be working as expected.

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

  • Posts: 1119
  • Thank you received: 114
9 years 3 days ago #221764

Hi,

Yep, it works like a charm!

Thank you

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

Time to create page: 0.095 seconds
Powered by Kunena Forum