Problems viewing the wishlist

  • Posts: 128
  • Thank you received: 0
11 years 4 months ago #151591

Hi!
I have a serious problem with the wishlist.
I login to the site, add the products I want for my wishlist. OK!
I see the lists that I created and I can editálas. Recalling that in opição "Share", I mark "All". OK!

That is where the problem happens only having username and password registered on the site may display the wishlist. Who is not registered on the site, do not see the wishlist.

I need to make my wishlist public, so anyone can view them.

Can anyone help me?

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #151637

Hi,

Yes we corrected that bug already, thanks to edit the file "components/com_hikashop/views/cart/view.html.php" in the function "showcart()" add:

		JRequest::setVar('cart_id',$cart_id);
Before:
		$app->setUserState( HIKASHOP_COMPONENT.'.'.$cart_type.'_id', $cart_id, 'int' );

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

  • Posts: 128
  • Thank you received: 0
11 years 3 months ago #152783

OK,
I performed this modification and even changed the following lines and it worked:

$filters = array('(a.user_id='.(int)$user->id.' OR a.session_id='.$database->Quote($user->session).') AND a.cart_type ='.$database->quote($cart_type));
}

By
$filters = array('a.cart_type ='.$database->quote($cart_type));

It worked, now my wishlist is visible to all registered users.

But two other serious problems occur:

1 Any registered user can delete all lists. This can never happen!
The registered user can delete only your list, you have to change it?

2 The wishilist is only visible to registered users. I need it to be Public (for non-registered user pose only view them).
Logical than to buy or book, they will be required to register.

It's possible you pass me the file and line of code I need to change to work this way?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #153011

Hi,

Thanks to replace the content of your view "cart / showcarts" by:

<?php
global $Itemid;
$Itemid_str = '&Itemid='.$Itemid;
$cart_type = $this->cart_type;
$userCurrent = hikashop_loadUser(true);
if(isset($userCurrent))
	$userCurrent = $userCurrent->id;
else
	$userCurrent = 0;
if(hikashop_loadUser() == null && false){
	echo JText::_('PLEASE_LOGIN_FIRST');
}else{
?>
<div id="hikashop_carts_listing">
<fieldset>
	<div class="header hikashop_header_title"><h1><?php if($cart_type == 'cart')echo JText::_('CARTS');else echo JText::_('WISHLISTS'); ?></h1></div>
	<div class="toolbar hikashop_header_buttons" id="toolbar" style="float: right;">
		<table class="hikashop_no_border">
			<tr>
				<td>
				<?php
					if($cart_type == 'cart' && $this->config->get('enable_multicart')){
				?>
						<a href="<?php echo hikashop_completeLink('cart&task=newcart&cart_type='.$cart_type.$Itemid_str); ?>">
							<span class="icon-32-add_cart" title="<?php echo JText::_('NEW_CART'); ?>">
							</span>
							<?php echo JText::_('NEW_CART'); ?>
						</a>
				<?php
					}elseif($cart_type == 'wishlist'){
				?>
						<a href="<?php echo hikashop_completeLink('cart&task=newcart&cart_type='.$cart_type.$Itemid_str); ?>">
							<span class="icon-32-add_wishlist" title="<?php echo JText::_('NEW_WISHLIST'); ?>">
							</span>
							<?php echo JText::_('NEW_WISHLIST'); ?>
						</a>
				<?php
					}
				?>
				</td>
				<?php if($userCurrent != 0){ ?>
				<td>
					<a href="<?php echo JRoute::_('index.php?option='.HIKASHOP_COMPONENT.'&view=user&layout=cpanel'.$Itemid_str); ?>" >
						<span class="icon-32-back" title="<?php echo JText::_('HIKA_BACK'); ?>">
						</span>
						<?php echo JText::_('HIKA_BACK'); ?>
					</a>
				</td>
				<?php } ?>
			</tr>
		</table>
	</div>
</fieldset>
<div class="iframedoc" id="iframedoc"></div>
<form action="<?php echo hikashop_completeLink('cart'); ?>" method="post"  name="adminForm" id="adminForm">
	<table class="hikashop_no_border">
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search" id="hikashop_search" value="<?php echo $this->escape($this->pageInfo->search);?>" class="inputbox" onchange="document.adminForm.submit();" />
				<button class="btn" onclick="this.form.submit();"><?php echo JText::_( 'GO' ); ?></button>
				<button class="btn" onclick="document.getElementById('hikashop_search').value='';this.form.submit();"><?php echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>"/>
	<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value="showcarts" />
	<input type="hidden" name="cart_type" value="<?php echo $cart_type; ?>" />
	<input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
	<table id="hikashop_cart_listing" class="hikashop_carts adminlist table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="hikashop_cart_num_title title titlenum" align="center">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="hikashop_cart_name_title title" align="center">
					<?php echo JText::_('CART_PRODUCT_NAME'); ?>
				</th>
				<th class="hikashop_cart_quantity_title title" align="center">
					<?php echo JText::_('PRODUCT_QUANTITY'); ?>
				</th>
				<th class="hikashop_cart_price_title title" align="center">
					<?php echo JText::_('PRODUCT_PRICE'); ?>
				</th>
				<th class="hikashop_cart_modified_title title" align="center">
					<?php echo JText::_('HIKA_LAST_MODIFIED'); ?>
				</th>
				<th class="hikashop_cart_current_title title" align="center">
					<?php echo JText::_('HIKA_CURRENT'); ?>
				</th>
				<th class="hikashop_cart_delete_title title" align="center">
					<?php echo JText::_('HIKA_DELETE'); ?>
				</th>
			</tr>
		</thead>
		<tfoot id="hikashop_wishlist_listing_pagination" >
			<tr>
				<td align="center" colspan="7">
					<div style="text-align:center;" class="pagination">
						<form action="<?php echo hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$Itemid_str); ?>" method="post" name="adminForm_bottom">
							<?php $this->pagination->form = '_bottom'; echo $this->pagination->getListFooter(); ?>
							<?php echo $this->pagination->getResultsCounter(); ?>
							<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>"/>
							<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
							<input type="hidden" name="task" value="showcarts" />
							<input type="hidden" name="cart_type" value="<?php echo $cart_type; ?>" />
							<input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
							<input type="hidden" name="boxchecked" value="0" />
							<input type="hidden" name="filter_order" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
							<input type="hidden" name="filter_order_Dir" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
							<?php echo JHTML::_( 'form.token' ); ?>
						</form>
					</div>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
			$app = JFactory::getApplication();
			$k = 1;
			//Calcul du prix total & nb de produits dans le cart
			foreach($this->carts as $cart){
				if($k ==1)$k = 0;else $k =1;
				if($cart->cart_id != null && isset($cart->quantity) && isset($cart->price)){
				?>
					<tr class="hikashop_all_carts row<?php echo $k;?>">
						<td data-title="<?php echo JText::_( 'HIKA_NUM' );?>">
							<a href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$cart->cart_id.'&cart_type='.$cart_type); ?>"  title="<?php echo $cart->cart_id ?>"><?php echo $cart->cart_id; ?></a>
						</td>
						<td data-title="<?php echo JText::_( 'CART_PRODUCT_NAME' );?>">
							<a href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$cart->cart_id.'&cart_type='.$cart_type); ?>"  title="<?php echo $this->escape(strip_tags($cart->cart_name));?>"><?php echo $this->escape(strip_tags($cart->cart_name));?></a>
						</td>
						<td data-title="<?php echo JText::_( 'PRODUCT_QUANTITY' );?>"><?php echo $cart->quantity;?></td>
						<td data-title="<?php echo JText::_( 'PRODUCT_PRICE' );?>">
						<?php
							$config =& hikashop_config();
							if($config->get('price_with_tax')){
								echo $this->currencyHelper->format($cart->price_with_tax,$cart->currency);
							}
							if($config->get('price_with_tax')==2){
								echo JText::_('PRICE_BEFORE_TAX');
							}
							if($config->get('price_with_tax')==2||!$config->get('price_with_tax')){
								echo $this->currencyHelper->format($cart->price,$cart->currency);
							}
							if($config->get('price_with_tax')==2){
								echo JText::_('PRICE_AFTER_TAX');
							}
						?>
						</td>
						<td data-title="<?php echo JText::_( 'HIKA_LAST_MODIFIED' );?>"><?php echo hikashop_getDate($cart->cart_modified);?></td>
					<?php
						if($userCurrent == $cart->user_id){
							$cart_id = $app->getUserState( HIKASHOP_COMPONENT.'.'.$cart_type.'_id', 0, 'int' );
							if($cart->cart_current == 1 || $cart->cart_id == $cart_id){
								?>
								<td data-title="<?php echo JText::_( 'HIKA_CURRENT' );?>" class='hikashop_all_carts_current'>
									<div class="hikashop_all_carts_current_star"></div>
								</td>
								<?php
							}
							else{
								?>
								<td data-title="<?php echo JText::_( 'HIKA_CURRENT' );?>" class='hikashop_all_carts_set_current'>
									<a  href="<?php echo hikashop_completeLink('cart&task=setcurrent&cart_id='.$cart->cart_id.'&cart_type='.$cart_type);?>">
										<div class='hikashop_all_carts_set_current_star'></div>
									</a>
								</td>
								<?php
							}
						}else{
						?>
							<td data-title="<?php echo JText::_( 'HIKA_CURRENT' );?>" class='hikashop_all_carts_set_current'></td>
						<?php
						}
						?>
						<td data-title="<?php echo JText::_( 'HIKA_DELETE' );?>" class="hikashop_all_carts_delete">
							<?php
							if($userCurrent == $cart->user_id){
							?>
							<a href="<?php echo hikashop_completeLink('cart&task=delete&cart_type='.$cart_type.'&cart_id='.$cart->cart_id); ?>"  title="<?php echo JText::_('HIKA_DELETE'); ?>">
								<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" />
							</a>
							<?php } ?>
						</td>
					</tr>
				<?php
				}
			}
			?>
		</tbody>
	</table>
</div>
<?php } ?>
<div class="clear_both"></div>

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

  • Posts: 128
  • Thank you received: 0
11 years 3 months ago #153120

Hi!
Eu fiz a alteração em: cart/showcarts e deu o seguinte erro:

Parse error: syntax error, unexpected '?' in /home/wwwmadam/public_html/site/templates/template_site/html/com_hikashop/cart/showcarts.php on line 39

Please check what happened!

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #153178

Hi,

I just tried on my end and I have no errors.
Are you sure that you copy/paste the whole code ?

There is probably a missing tag or something like that.

If you are not able to solve this problem, thanks to give a backend access via PM with the url of that topic.

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

  • Posts: 128
  • Thank you received: 0
11 years 3 months ago #153550

OK, now the system is working!
I need you to give me the full path to the file that you changed!
Another thing, when a registered user lit a wishilist, and click on the products you wish to purchase below shows "add to cart" button, but before also appeared "checkout", you're not showing more!
You can help me with this?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #153783

Hi,

I just edited the view "cart / showcarts" via the menu Display > Views. So this file is in the template, here:
"templates/YOUR_TEMPLATE/html/com_hikashop/cart/showcarts.php"

I don't really understand your new request, thanks to give us more details.

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

  • Posts: 128
  • Thank you received: 0
11 years 3 months ago #154395

Grateful!
Problem solved!

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

  • Posts: 128
  • Thank you received: 0
11 years 1 month ago #163424

Hi!
Well, I came up with another little problem in the view of my wish list.
From the beginning there were some issues that have been fixed!
I want when clicking the link wishilist, the lists appear!
Now, you are required to register to view the lists!
I want them to be viewed by all, without registering! After the netizen want adiquirir a product from the list, it will be required to register to be able to checkout!
Get it?

You can help me by showing me the file and I modify the code?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #163492

Hi,

the view "cart / showcarts" via the menu Display > Views. So this file is in the template, here:
"templates/YOUR_TEMPLATE/html/com_hikashop/cart/showcarts.php"


It still in the same view that you need to do your modifications. Remove the if/else condition on the user login status in order to always display the list.

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

  • Posts: 128
  • Thank you received: 0
11 years 1 month ago #163505

Hi!
I understand!
I entered the Hikashop component, I clicked on the menu Display> Views.
After finding the file "templates / your_template / html / com_hikashop / cart / showcarts.php".
I sought the command line "if / else" the "condition on the user login status" but does not have this command line, this file!
Please can you be more specific?

CODE:

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.3.0
 * @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
global $Itemid;
$Itemid = '&Itemid='.$Itemid;
$cart_type = $this->cart_type;
$userCurrent = hikashop_loadUser(true);
if(isset($userCurrent))
	$userCurrent = $userCurrent->id;
else
	$userCurrent = 0;
if(hikashop_loadUser() == null){
	echo JText::_('PLEASE_LOGIN_FIRST');
}else{
?>
<div id="hikashop_carts_listing">
<fieldset>
	<div class="header hikashop_header_title"><h1><?php if($cart_type == 'cart')echo JText::_('CARTS');else echo JText::_('WISHLISTS'); ?></h1></div>
	<div class="toolbar hikashop_header_buttons" id="toolbar" style="float: right;">
		<table class="hikashop_no_border">
			<tr>
				<td>
				<?php
					if($cart_type == 'cart' && $this->config->get('enable_multicart')){
				?>
						<a href="<?php echo hikashop_completeLink('cart&task=newcart&cart_type='.$cart_type.$Itemid); ?>">
							<span class="icon-32-add_cart" title="<?php echo JText::_('NEW_CART'); ?>">
							</span>
							<?php echo JText::_('NEW_CART'); ?>
						</a>
				<?php
					}elseif($cart_type == 'wishlist'){
				?>
						<a href="<?php echo hikashop_completeLink('cart&task=newcart&cart_type='.$cart_type.$Itemid); ?>">
							<span class="icon-32-add_wishlist" title="<?php echo JText::_('NEW_WISHLIST'); ?>">
							</span>
							<?php echo JText::_('NEW_WISHLIST'); ?>
						</a>
				<?php
					}
				?>
				</td>
				<?php if($userCurrent != 0){ ?>
				<td>
					<a href="<?php echo JRoute::_('index.php?option='.HIKASHOP_COMPONENT.'&view=user&layout=cpanel'.$Itemid); ?>" >
						<span class="icon-32-back" title="<?php echo JText::_('HIKA_BACK'); ?>">
						</span>
						<?php echo JText::_('HIKA_BACK'); ?>
					</a>
				</td>
				<?php } ?>
			</tr>
		</table>
	</div>
</fieldset>
<div class="iframedoc" id="iframedoc"></div>
<form action="<?php echo hikashop_completeLink('cart'); ?>" method="post"  name="adminForm" id="adminForm">
	<table class="hikashop_no_border">
		<tr>
			<td width="100%">
				<?php echo JText::_( 'FILTER' ); ?>:
				<input type="text" name="search" id="hikashop_search" value="<?php echo $this->escape($this->pageInfo->search);?>" class="inputbox" onchange="document.adminForm.submit();" />
				<button class="btn" onclick="this.form.submit();"><?php echo JText::_( 'GO' ); ?></button>
				<button class="btn" onclick="document.getElementById('hikashop_search').value='';this.form.submit();"><?php echo JText::_( 'RESET' ); ?></button>
			</td>
		</tr>
	</table>
	<?php global $Itemid; ?>
	<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>"/>
	<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" value="showCarts" />
	<input type="hidden" name="cart_type" value="<?php echo $cart_type; ?>" />
	<input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
	<table id="hikashop_cart_listing" class="hikashop_carts adminlist table table-striped table-hover" cellpadding="1">
		<thead>
			<tr>
				<th class="hikashop_cart_num_title title titlenum" align="center">
					<?php echo JText::_( 'HIKA_NUM' );?>
				</th>
				<th class="hikashop_cart_name_title title" align="center">
					<?php echo JText::_('CART_PRODUCT_NAME'); ?>
				</th>
				<th class="hikashop_cart_quantity_title title" align="center">
					<?php echo JText::_('PRODUCT_QUANTITY'); ?>
				</th>
				<th class="hikashop_cart_price_title title" align="center">
					<?php echo JText::_('PRODUCT_PRICE'); ?>
				</th>
				<th class="hikashop_cart_modified_title title" align="center">
					<?php echo JText::_('HIKA_LAST_MODIFIED'); ?>
				</th>
				<th class="hikashop_cart_current_title title" align="center">
					<?php echo JText::_('HIKA_CURRENT'); ?>
				</th>
				<th class="hikashop_cart_delete_title title" align="center">
					<?php echo JText::_('HIKA_DELETE'); ?>
				</th>
			</tr>
		</thead>
		<tfoot id="hikashop_wishlist_listing_pagination" >
			<tr>
				<td align="center" colspan="7">
					<div style="text-align:center;" class="pagination">
						<form action="<?php echo hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.'&Itemid='.$Itemid); ?>" method="post" name="adminForm_bottom">
							<?php $this->pagination->form = '_bottom'; echo $this->pagination->getListFooter(); ?>
							<?php echo $this->pagination->getResultsCounter(); ?>
							<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>"/>
							<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
							<input type="hidden" name="task" value="showCarts" />
							<input type="hidden" name="cart_type" value="<?php echo $cart_type; ?>" />
							<input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
							<input type="hidden" name="boxchecked" value="0" />
							<input type="hidden" name="filter_order" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
							<input type="hidden" name="filter_order_Dir" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
							<?php echo JHTML::_( 'form.token' ); ?>
						</form>
					</div>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php
			$app = JFactory::getApplication();
			$k = 1;
			foreach($this->carts as $cart){
				if($k ==1)$k = 0;else $k =1;
				if($cart->cart_id != null && isset($cart->quantity) && isset($cart->price)){
				?>
					<tr class="hikashop_all_carts row<?php echo $k;?>">
						<td data-title="<?php echo JText::_( 'HIKA_NUM' );?>">
							<a href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$cart->cart_id.'&cart_type='.$cart_type); ?>"  title="<?php echo $cart->cart_id ?>"><?php echo $cart->cart_id; ?></a>
						</td>
						<td data-title="<?php echo JText::_( 'CART_PRODUCT_NAME' );?>">
							<a href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$cart->cart_id.'&cart_type='.$cart_type); ?>"  title="<?php echo $this->escape(strip_tags($cart->cart_name));?>"><?php echo $this->escape(strip_tags($cart->cart_name));?></a>
						</td>
						<td data-title="<?php echo JText::_( 'PRODUCT_QUANTITY' );?>"><?php echo $cart->quantity;?></td>
						<td data-title="<?php echo JText::_( 'PRODUCT_PRICE' );?>">
						<?php
							$config =& hikashop_config();
							if($config->get('price_with_tax')){
								echo $this->currencyHelper->format($cart->price_with_tax,$cart->currency);
							}
							if($config->get('price_with_tax')==2){
								echo JText::_('PRICE_BEFORE_TAX');
							}
							if($config->get('price_with_tax')==2||!$config->get('price_with_tax')){
								echo $this->currencyHelper->format($cart->price,$cart->currency);
							}
							if($config->get('price_with_tax')==2){
								echo JText::_('PRICE_AFTER_TAX');
							}
						?>
						</td>
						<td data-title="<?php echo JText::_( 'HIKA_LAST_MODIFIED' );?>"><?php echo hikashop_getDate($cart->cart_modified);?></td>
					<?php
						if($userCurrent == $cart->user_id){
							$cart_id = $app->getUserState( HIKASHOP_COMPONENT.'.'.$cart_type.'_id', 0, 'int' );
							if($cart->cart_current == 1 || $cart->cart_id == $cart_id){
								?>
								<td data-title="<?php echo JText::_( 'HIKA_CURRENT' );?>" class='hikashop_all_carts_current'>
									<div class="hikashop_all_carts_current_star"></div>
								</td>
								<?php
							}
							else{
								?>
								<td data-title="<?php echo JText::_( 'HIKA_CURRENT' );?>" class='hikashop_all_carts_set_current'>
									<a  href="<?php echo hikashop_completeLink('cart&task=setcurrent&cart_id='.$cart->cart_id.'&cart_type='.$cart_type);?>">
										<div class='hikashop_all_carts_set_current_star'></div>
									</a>
								</td>
								<?php
							}
						}else{
						?>
							<td data-title="<?php echo JText::_( 'HIKA_CURRENT' );?>" class='hikashop_all_carts_set_current'></td>
						<?php
						}
						?>
						<td data-title="<?php echo JText::_( 'HIKA_DELETE' );?>" class="hikashop_all_carts_delete">
							<?php
							if($userCurrent == $cart->user_id){
							?>
							<a href="<?php echo hikashop_completeLink('cart&task=delete&cart_type='.$cart_type.'&cart_id='.$cart->cart_id); ?>"  title="<?php echo JText::_('HIKA_DELETE'); ?>">
								<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" />
							</a>
							<?php } ?>
						</td>
					</tr>
				<?php
				}
			}
			?>
		</tbody>
	</table>
</div>
<?php } ?>
<div class="clear_both"></div>

Last edit: 11 years 1 month ago by Xavier. Reason: Use of [code] tag

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #163518

Thanks to remove:

if(hikashop_loadUser() == null){
	echo JText::_('PLEASE_LOGIN_FIRST');
}else{
And the last:
<?php } ?>

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

  • Posts: 128
  • Thank you received: 0
11 years 1 month ago #163729

Hi!
I replaced the following code:

if(hikashop_loadUser() == null){
echo JText::_('PLEASE_LOGIN_FIRST');
}else{

by:
<?php } ?>

And it did not work, kept asking us to login.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #163770

Hi,

I just tried on my end and removing that part, correctly display the wishlists interface. So you have maybe edited the view in the wrong template.
But, there is no wishlists displayed because, the current user don't have anyone, that's the way the system is working.

If you really want to display all the wishlists to anybody, so this is not a common way of using wishlists and this is not handle by HikaShop. So you will have to edit core file in order to have what you want.

To show all the wishlists to everybody even if he is not registered you have to edit the file "components/com_hikashop/views/cart/view.html.php", function "showcarts()". It require PHP knowledges.

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

  • Posts: 128
  • Thank you received: 0
11 years 1 month ago #163874

Okay!
But that line of code should I modify and what code should I insert this file?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #164216

Hi,

In the view.html.php filen you have to remove the filters based on the user session id or the user id.
Replace:

		if(hikashop_loadUser() == null){
			$filters = array('a.session_id='.$database->Quote($user->session).' AND a.cart_type ='.$database->quote($cart_type));
		}else{
			$filters = array('(a.user_id='.(int)$user->id.' OR a.session_id='.$database->Quote($user->session).') AND a.cart_type ='.$database->quote($cart_type));
		}
By:
$filters = array();

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

  • Posts: 128
  • Thank you received: 0
11 years 1 month ago #164299

Efetuei the change of command in the file that you showed me, but it worked!
Can you help me solve this problem?
Many thanks for the help already given

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #164327

Hi,

Efetuei the change of command in the file that you showed me, but it worked!
Can you help me solve this problem?


In what ? Can you give more details ?

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

  • Posts: 128
  • Thank you received: 0
11 years 1 month ago #164382

Sorry!
I meant "Does not work".
The system keeps asking to log in.

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

Time to create page: 0.108 seconds
Powered by Kunena Forum