Clicking "Proceed to Checkout" Generates 404 Error

  • Posts: 45
  • Thank you received: 1
10 years 7 months ago #167783

-- url of the page with the problem -- : testdev.erielackhs.org/joomla/
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5.24
-- PHP version -- : 5.3.26
-- Browser(s) name and version -- : Chrome Version 36.0.1985.143 m
-- Error-message(debug-mod must be tuned on) -- : Strict Standards: Declaration of JCacheControllerPage::store() should be compatible with JCacheController::store($data, $id, $group = NULL) in C:\xampp\htdocs\erielackhs\libraries\joomla\cache\controller\page.php on line 199

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\erielackhs\plugins\system\modulesanywhere\modulesanywhere.php on line 47

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\erielackhs\plugins\system\modulesanywhere\modulesanywhere.php on line 50

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\erielackhs\plugins\system\modulesanywhere\modulesanywhere.php on line 85

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\erielackhs\plugins\system\modulesanywhere\helper.php on line 53

404 Category Not Found
Additional listing under the standard 404 error banner/border
Call stack
# Function Location
1 JSite->dispatch() \erielackhs\index.php:42
2 JComponentHelper::renderComponent() \erielackhs\includes\application.php:194
3 JComponentHelper::executeComponent() C:\xampp\htdocs\erielackhs\libraries\joomla\application\component\helper.php:348
4 require_once() \erielackhs\libraries\joomla\application\component\helper.php:380
5 JController->execute() \erielackhs\components\com_content\content.php:16
6 ContentController->display() \erielackhs\libraries\joomla\application\component\controller.php:761
7 JController->display() \erielackhs\components\com_content\controller.php:74
8 ContentViewCategory->display() C:\xampp\htdocs\erielackhs\libraries\joomla\application\component\controller.php:722
9 JError::raiseError() \erielackhs\components\com_content\views\category\view.html.php:59
10 JError::raise() \erielackhs\libraries\joomla\error\error.php:251

Errors under Joomla Debug Console:
Category not found
Call stack
# Function Location
1 JSite->dispatch() JROOT\index.php:42
2 JComponentHelper::renderComponent() JROOT\includes\application.php:194
3 JComponentHelper::executeComponent() JROOT\libraries\joomla\application\component\helper.php:348
4 require_once() JROOT\libraries\joomla\application\component\helper.php:380
5 JController->execute() JROOT\components\com_content\content.php:16
6 ContentController->display() JROOT\libraries\joomla\application\component\controller.php:761
7 JController->display() JROOT\components\com_content\controller.php:74
8 ContentViewCategory->display() JROOT\libraries\joomla\application\component\controller.php:722
9 JError::raiseError() JROOT\components\com_content\views\category\view.html.php:59
10 JError::raise() JROOT\libraries\joomla\error\error.php:251

PHP 5.3.36
MySQL 5.0.9
Apache 2.2.24
Joomla 2.5.24
HikaShop 2.3.2

A 404 error is generated and a specific product category name is inserted into the url whenever the "Proceed to Checkout" button is checked on any page other than the HikaShop product pages. This does not occur in HikaShop 2.3.0.

I have search through the forum and found 404 issues and canonical URLs causing 404 errors with HikaShop 2.3.2 but nothing has help me determine what is causing this nor what the solution is. Any help with be appreciated including redirecting my to the forum post that may help and that I have missed in my search.

Thank you,

Paul

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

  • Posts: 2143
  • Thank you received: 747
10 years 7 months ago #167794

it seems you are using the Joomla cache. That's a bad idea since the Joomla cache isn't adjustable well enough to work with an e-commerce system such as HikaShop (or others, for that matter).

So, turn off the cache, disable it in the Joomla plugin manager, empty the cache one last time, then at least the first error should go away, and likely the others, too.

If you insisted on caching your site, you should look for, use and carefully adjust, a more fine-grained 3rd-party cache extension.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 10 years 7 months ago by lousyfool. Reason: copy & paste error

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

  • Posts: 45
  • Thank you received: 1
10 years 7 months ago #168336

Cache has been disable and cleared as you recommended, however, the problem still persists. I am upgrading from 2.2.2 to 2.3.2. and at the moment this problem prevents me from doing that in production.

I recreate my site on a local development system and deployed a newer template for the site thinking that the template may be causing the issue, however, this is not the case. The user is sill redirected to a bad link and receives the 404 error. It is always the same URL that any link in the shopping cart sends you to. That link in my case is

ltestdeve.erielackhs.org/index.php/Track...s/product/updatecart .

TrachCharts is a product category. This behavior occurs when the user is not on a product category page but it works correctly when the user is on a product page.

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

  • Posts: 45
  • Thank you received: 1
10 years 7 months ago #168337

Sorry, I have a typo in the link I just gave you. The correct link is:

testdev.erielackhs.org/joomla/index.php/...s/product/updatecart

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

  • Posts: 12953
  • Thank you received: 1778
10 years 7 months ago #168343

Hello,
Can you test it with the "Modules Anywhere" extension disabled ? If you are using a SEF module / SEF options, can you disable it and try it again so that we can know if it's coming from it ?
Also can you show me how did you configured your checkout workflow through some screenshots ("Hikashop->System->Configuration->Checkout") ?

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

  • Posts: 45
  • Thank you received: 1
10 years 7 months ago #168435

Modules Anywhere and any article that has been published using the module have been disable, I also selected SEF -No in the site configuration and disabled the System SEF. Now I get a 403 "You are not authorized to view this resource" error whenever I am not on a product category page.

Here is a screenshot of my checkout configuration.

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

  • Posts: 45
  • Thank you received: 1
10 years 7 months ago #168436
Attachments:

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

  • Posts: 83568
  • Thank you received: 13522
  • MODERATOR
10 years 7 months ago #168550

Hi,

You must have a customized version of the product/cart.php view file.
Go in the menu Display->Views and edit it. There put the code:

<?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);
}
$this->setLayout('listing_price');
$this->params->set('show_quantity_field', 0);
$desc = $this->params->get('msg');
$cart_type = $this->params->get('cart_type','cart');
$cart_itemid = $url_itemid;
if($cart_type == 'wishlist'){
	$convertText = JText::_('WISHLIST_TO_CART');
	$displayText = JText::_('DISPLAY_THE_WISHLIST');
	$displayAllText = JText::_('DISPLAY_THE_WISHLISTS');
	$emptyText = JText::_('WISHLIST_EMPTY');

	// Set a custom item id for the wishlist page
	$menusClass = hikashop_get('class.menus');
	$set = $menusClass->loadAMenuItemId('cart','showcart',$this->params->get('cart_itemid', 0));
	if(!$set)
		$set = $menusClass->loadAMenuItemId('cart','showcart');
	if(!$set)
		$set = $menusClass->loadAMenuItemId('','');
	if($set)
		$cart_itemid='&Itemid='.$set;
}else{
	$convertText = JText::_('CART_TO_WISHLIST');
	$displayText = JText::_('DISPLAY_THE_CART');
	$displayAllText = JText::_('DISPLAY_THE_CARTS');
	$emptyText = JText::_('CART_EMPTY');
}
if(empty($desc) && $desc != '0'){
	$this->params->set('msg',$emptyText);
}
if(!headers_sent()){
	header( 'Cache-Control: no-store, no-cache, must-revalidate' );
	header( 'Cache-Control: post-check=0, pre-check=0', false );
	header( 'Pragma: no-cache' );
}
$cart_type=$this->params->get('cart_type','cart');
if($this->params->get('from','no') == 'no'){
	$this->params->set('from',JRequest::getString('from','display'));
}
if(empty($this->rows)){
	$desc = trim($this->params->get('msg'));
	if(!empty($desc) || $desc == '0'){
		echo $this->notice_html;  ?>
		<div id="hikashop_cart" class="hikashop_cart">
			<?php echo $desc; ?>
		</div>
		<div class="clear_both"></div>
<?php
	}
}else{ ?>
<div id="hikashop_cart" class="hikashop_cart">
	<?php
	if($this->config->get('print_cart',0) && JRequest::getVar('tmpl','')!='component' && $cart_type != 'wishlist'){
	?>
	<div class="_hikashop_checkout_cart_print_link">
	<?php
		echo $this->popup->display(
			'<img src="'.HIKASHOP_IMAGES.'print.png" alt="'.JText::_('HIKA_PRINT').'" />',
			'HIKA_PRINT',
			hikashop_completeLink('checkout&task=printcart',true),
			'hikashop_print_popup',
			760, 480, '', '', 'link'
		);
	?>
	</div>
<?php
	}
	else if($this->params->get('from','display') != 'module'){
		echo '<div class="hikashop_product_cart_links">';
			echo '<div class="hikashop_product_cart_show_carts_link">';
				echo $this->cart->displayButton($displayAllText,'cart',$this->params,hikashop_completeLink('cart&task=showcarts&cart_type='.$cart_type.$cart_itemid),'');
			echo '</div>';
?>
			<div class="hikashop_product_cart_mail_link">
			<?php
				echo $this->popup->display(
					'<img src="'.HIKASHOP_IMAGES.'go.png" alt="'.JText::_('HIKA_EMAIL').'" />',
					'HIKA_EMAIL',
					hikashop_completeLink('product&task=sendcart',true),
					'hikashop_email_popup',
					760, 480, '', '', 'link'
				);
			?>
			</div>
			<div class="hikashop_product_cart_print_link">
			<?php
				echo $this->popup->display(
					'<img src="'.HIKASHOP_IMAGES.'print.png" alt="'.JText::_('HIKA_PRINT').'" />',
					'HIKA_PRINT',
					hikashop_completeLink('product&task=printcart',true),
					'hikashop_print_popup',
					760, 480, '', '', 'link'
				);
			?>
			</div>
<?php
		echo '</div><div class="clear_both"></div>';
	}

	echo $this->notice_html;
	$row_count = 0;

	if($this->params->get('small_cart')){
		$this->row=$this->total;
		if($this->params->get('show_cart_quantity',1)){
			$qty = 0;
			$group = $this->config->get('group_options',0);
			foreach($this->rows as $i => $row){
				if(empty($row->cart_product_quantity) && $cart_type  != 'wishlist') continue;
				if($group && $row->cart_product_option_parent_id) continue;
				$qty+=$row->cart_product_quantity;
			}
			if($qty==1){
				if(JText::_('X_ITEM_FOR_X')=='X_ITEM_FOR_X'){
					$text = JText::sprintf('X_ITEMS_FOR_X',$qty,$this->loadTemplate());
				}else{
					$text = JText::sprintf('X_ITEM_FOR_X',$qty,$this->loadTemplate());
				}
			}else{
				$text = JText::sprintf('X_ITEMS_FOR_X',$qty,$this->loadTemplate());
			}
		}else{
			$text = JText::sprintf('TOTAL_IN_CART_X',$this->loadTemplate());
		}

		if($cart_type != 'wishlist'){
			?>
			<a class="hikashop_small_cart_checkout_link" href="<?php echo $url_checkout; ?>">
				<span class="hikashop_small_cart_total_title"><?php echo $text; ?></span>
			</a><?php
			if($this->params->get('show_cart_delete',1)){
				$delete = hikashop_completeLink('product&task=cleancart');
				if(strpos($delete,'?')){
					$delete.='&amp;';
				}else{
					$delete.='?';
				} ?>
			<a class="hikashop_small_cart_clean_link" onclick="window.location='<?php echo $delete.'return_url='; ?>'+window.btoa(window.location); return false;" href="#" >
				<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="clean cart" />
			</a><?php
			}
			if($this->params->get('show_cart_proceed',1) && $this->params->get('cart_type','cart') != 'wishlist'  && $this->params->get('from','display') == 'module'){
				echo $this->cart->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'checkout',$this->params,$url_checkout,'window.location=\''.$url_checkout.'\';return false;');
			}
		}else{
			foreach($this->rows as $row){
				$cart_id = $row->cart_id;
			}
			?>
			<a class="hikashop_small_cart_checkout_link" href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$cart_id.'&cart_type='.$cart_type.$cart_itemid); ?>">
				<span class="hikashop_small_cart_total_title"><?php echo $text; ?></span>
			</a>
			<?php
		}
	}else{
		if($cart_type == 'wishlist'){
				$form = 'hikashop_wishlist_form';
		}
		else{
			$form = 'hikashop_cart_form';
		}
	?>
	<form action="<?php echo hikashop_completeLink('product&task=updatecart'.$url_itemid,false,true); ?>" method="post" name="<?php echo $form;?>">
		<table width="100%">
			<thead>
				<tr>
					<?php if(@$this->params->get('image_in_cart')){
						$row_count++; ?>
					<th class="hikashop_cart_module_product_image_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_IMAGE'); ?>
					</th>
					<?php }
					if($this->params->get('show_cart_product_name',1)){
					 	$row_count++; ?>
					<th class="hikashop_cart_module_product_name_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_NAME'); ?>
					</th>
					<?php }
					if($this->params->get('show_cart_quantity',1)){
						$row_count++; ?>
						<th class="hikashop_cart_module_product_quantity_title hikashop_cart_title">
							<?php echo JText::_('CART_PRODUCT_QUANTITY'); ?>
						</th>
					<?php }
					if($this->params->get('show_price',1)){
						$row_count++; ?>
					<th class="hikashop_cart_module_product_price_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_PRICE'); ?>
					</th>
					<?php }
					if($this->params->get('show_cart_delete',1)){
						$row_count++; ?>
					<th class="hikashop_cart_title">
					</th>
					<?php }
					if($row_count<1){ ?>
					<th></th>
					<?php }?>
				</tr>
			</thead>
			<?php if($this->params->get('show_price',1) && $this->params->get('cart_type','cart') != 'wishlist'){ ?>
			<tfoot>
				<tr>
					<td colspan="<?php echo $row_count;?>">
						<hr />
					</td>
				</tr>
				<?php if($this->params->get('show_coupon',0) && !empty($this->element->coupon)){ ?>
				<tr>
					<?php
					switch($row_count){
						case 0:
						case 1: ?>
							<td class="hikashop_cart_module_coupon_value">
								<?php
								if(!$this->params->get('price_with_tax')){
									echo $this->currencyHelper->format(@$this->element->coupon->discount_value_without_tax*-1,@$this->element->coupon->discount_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->element->coupon->discount_value*-1,@$this->element->coupon->discount_currency_id);
								}
								?>
							</td>
							<?php
							break;

						default:
							$colspan = $row_count-1;
							if($this->params->get('show_cart_delete',1)){
								$colspan=$colspan-1;
							}
							if($colspan){
							?>
							<td class="hikashop_cart_module_coupon_title" colspan="<?php echo $colspan; ?>">
								<?php echo JText::_('HIKASHOP_COUPON'); ?>
							</td>
							<?php } ?>
							<td class="hikashop_cart_module_coupon_value">
								<?php
								if(!$this->params->get('price_with_tax')){
									echo $this->currencyHelper->format(@$this->element->coupon->discount_value_without_tax*-1,@$this->element->coupon->discount_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->element->coupon->discount_value*-1,@$this->element->coupon->discount_currency_id);
								}
								?>
							</td>
							<?php if($this->params->get('show_cart_delete',1)){ ?>
								<td>
								</td>
							<?php }
							break;
					}?>
				</tr>
				<?php } ?>
				<?php if($this->params->get('show_shipping',0) && !empty($this->element->shipping)){
							$shipping_price = null;
							foreach($this->element->shipping as $shipping) {
								if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
									$shipping->shipping_price = $shipping->shipping_price_with_tax;
								}
								if(isset($shipping->shipping_price)) {
									if($shipping_price === null)
										$shipping_price = 0.0;
									if(!$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
										$shipping_price += $shipping->shipping_price;
									} else {
										$shipping_price += $shipping->shipping_price_with_tax;
									}
								}
							}
							if($shipping_price !== null) {
								$shipping_price = $this->currencyHelper->format($shipping_price, $this->total->prices[0]->price_currency_id);
							}
							if($shipping_price){
							?>
							<tr>
								<?php
								switch($row_count){
									case 0:
									case 1: ?>
										<td class="hikashop_cart_module_shipping_value">
											<?php
											echo $shipping_price;
											?>
										</td>
										<?php
										break;

									default:
										$colspan = $row_count-1;
										if($this->params->get('show_cart_delete',1)){
											$colspan=$colspan-1;
										}
										if($colspan){
										?>
										<td class="hikashop_cart_module_shipping_title" colspan="<?php echo $colspan; ?>">
											<?php echo JText::_('HIKASHOP_SHIPPING'); ?>
										</td>
										<?php } ?>
										<td class="hikashop_cart_module_shipping_value">
											<?php
											echo $shipping_price;
											?>
										</td>
										<?php if($this->params->get('show_cart_delete',1)){ ?>
											<td>
											</td>
										<?php }
										break;
								}?>
							</tr>
				<?php 	}
					} ?>
				<tr>
					<?php
					switch($row_count){
						case 0:
						case 1: ?>
							<td class="hikashop_cart_module_product_total_value">
								<?php
								$this->row=$this->total;
								echo $this->loadTemplate(); ?>
							</td>
							<?php
							break;

						default:
							$colspan = $row_count-1;
							if($this->params->get('show_cart_delete',1)){
								$colspan=$colspan-1;
							}
							if($colspan){
							?>
							<td class="hikashop_cart_module_product_total_title" colspan="<?php echo $colspan; ?>">
								<?php echo JText::_('HIKASHOP_TOTAL'); ?>
							</td>
							<?php } ?>
							<td class="hikashop_cart_module_product_total_value">
							<?php
								$this->row=$this->total;
								echo $this->loadTemplate();
							?>
							</td>
							<?php if($this->params->get('show_cart_delete',1)){ ?>
								<td>
								</td>
							<?php }
							break;
					}?>
				</tr>
			</tfoot>
			<?php } ?>
			<tbody>
				<?php
					$k = 0;
					$this->cart_product_price = true;
					$group = $this->config->get('group_options',0);
					$cart_id = 0;
					$app = JFactory::getApplication();
					$productClass = hikashop_get('class.product');

					$defaultParams = $this->config->get('default_params');

					$this->image = hikashop_get('helper.image');
					$height = $this->config->get('thumbnail_y');
					$width = $this->config->get('thumbnail_x');
					foreach($this->rows as $i => $row){
						$cart_id = $row->cart_id;
						if(empty($row->cart_product_quantity) || @$row->hide == 1) continue;
						if($group && $row->cart_product_option_parent_id) continue;
						$productClass->addAlias($row);
						?>
						<tr class="<?php echo "row$k"; ?>">
							<?php if(@$this->params->get('image_in_cart')){ ?>
							<td class="hikashop_cart_module_product_image hikashop_cart_value" style="vertical-align:middle !important; text-align:center;">
								<?php
									$image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
									$img = $this->image->getThumbnail(@$row->images[0]->file_path, array('width' => $width, 'height' => $height), $image_options);
									if($img->success) {
										echo '<img class="hikashop_product_cart_image" title="'.$this->escape(@$row->images[0]->file_description).'" alt="'.$this->escape(@$row->images[0]->file_name).'" src="'.$img->url.'"/>';
									}
									//echo $this->image->display(@$row->images[0]->file_path,true,@$row->images[0]->file_name,'id="hikashop_main_image_'.$row->product_id.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','', $width,  $height);
								?>
							</td>
							<?php }
							if($this->params->get('show_cart_product_name',1)){ ?>
							<td class="hikashop_cart_module_product_name_value hikashop_cart_value">
								<?php if(@$defaultParams['link_to_product_page']){ ?> <a href="<?php echo hikashop_contentLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$url_itemid,$row);?>" ><?php } ?>
									<?php echo $row->product_name; ?>
									<?php if ($this->config->get('show_code')) { ?>
										<span class="hikashop_product_code_cart"><?php echo $row->product_code; ?></span>
									<?php } ?>
								<?php if(@$defaultParams['link_to_product_page']){ ?></a><?php }
									ob_start();
									if(hikashop_level(2) && !empty($this->itemFields)){
										foreach($this->itemFields as $field){
											$namekey = $field->field_namekey;
											if(!empty($row->$namekey) && strlen($row->$namekey)){
												echo '<p class="hikashop_cart_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).': '.$this->fieldsClass->show($field,$row->$namekey).'</p>';
											}
										}
									}
									$input='';
									if($group){
										foreach($this->rows as $j => $optionElement){
											if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
											echo '<p class="hikashop_cart_option_name">'. $optionElement->product_name.'</p>';
											$input .='document.getElementById(\'cart_product_option_'.$optionElement->cart_product_id.'\').value=qty_field.value;';
											echo '<input type="hidden" id="cart_product_option_'.$optionElement->cart_product_id.'" name="item['.$optionElement->cart_product_id.'][cart_product_quantity]" value="'.$row->cart_product_quantity.'"/>';
										}
									}
									$html = ob_get_clean();
									if(!empty($html)){
										echo '<p class="hikashop_cart_product_custom_item_fields">'.$html.'</p>';
									}
								?>
							</td>
							<?php
							}
							if($group){
								foreach($this->rows as $j => $optionElement){
									if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
									if(!empty($optionElement->prices[0])){
										if(!isset($row->prices[0])){
											$row->prices[0]->price_value=0;
											$row->prices[0]->price_value_with_tax=0;
											$row->prices[0]->price_currency_id = hikashop_getCurrency();
										}
										foreach(get_object_vars($row->prices[0]) as $key => $value){
											if(is_object($value)){
												foreach(get_object_vars($value) as $key2 => $var2){
													if(strpos($key2,'price_value')!==false) $row->prices[0]->$key->$key2 +=@$optionElement->prices[0]->$key->$key2;
												}
											}else{
												if(strpos($key,'price_value')!==false) $row->prices[0]->$key+=@$optionElement->prices[0]->$key;
											}
										}
									}
								}
							}
							if($this->params->get('show_cart_quantity',1)){
							?>
							<td class="hikashop_cart_module_product_quantity_value hikashop_cart_value">
								<?php
									if(empty($session))
										$session = new stdClass();
									$session->cart_id = $app->getUserState( HIKASHOP_COMPONENT.'.'.$cart_type.'_id', 0, 'int' );

									if($row->cart_id == $session->cart_id && $this->params->get('from','display') != 'module'){
										if($row->product_quantity_layout == 'show_select' || (empty($this->row->product_quantity_layout) && $this->config->get('product_quantity_display', '') == 'show_select')){
											$min_quantity = $row->product_min_per_order;
											$max_quantity = $row->product_max_per_order;
											if($min_quantity == 0)
												$min_quantity = 1;
											if($max_quantity == 0)
												$max_quantity = (int)$min_quantity * 15;
											?>
												<select id="hikashop_wishlist_quantity_select_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" onchange="var qty_field = document.getElementById('hikashop_wishlist_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>'); qty_field.value = this.value; if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;">
													<?php
													for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
														$selected = '';
														if($j == $row->cart_product_quantity)
															$selected = 'selected="selected"';
														echo '<option value="'.$j.'" '.$selected.'>'.$j.'</option>';
													}
													?>
												</select>
												<input id="hikashop_wishlist_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" type="hidden" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" value="<?php echo $row->cart_product_quantity; ?>"/>
												<?php
										}else{
											?>
											<input id="hikashop_wishlist_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_wishlist_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;" />
											<?php
										}
									?>

										<div class="hikashop_cart_product_quantity_refresh">
											<a href="#" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">
												<img src="<?php echo HIKASHOP_IMAGES . 'refresh.png';?>" border="0" alt="<?php echo JText::_('HIKA_REFRESH'); ?>" />
											</a>
										</div>
									<?php
									}else{
										if($row->product_quantity_layout == 'show_select' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', '') == 'show_select')){
											$min_quantity = $row->product_min_per_order;
											$max_quantity = $row->product_max_per_order;
											if($min_quantity == 0)
												$min_quantity = 1;
											if($max_quantity == 0)
												$max_quantity = (int)$min_quantity * 15;
											?>
												<select id="hikashop_cart_quantity_select_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" class="tochosen" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>'); qty_field.value = this.value; if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;">
													<?php
													for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
														$selected = '';
														if($j == $row->cart_product_quantity)
															$selected = 'selected="selected"';
														echo '<option value="'.$j.'" '.$selected.'>'.$j.'</option>';
													}
													?>
												</select>
												<input id="hikashop_cart_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" type="hidden" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" value="<?php echo $row->cart_product_quantity; ?>" />
												<?php
										}else{
											?>
											<input id="hikashop_cart_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;" />
											<?php
										}
									}
									 if($this->params->get('show_delete',1) && $this->params->get('from','display') != 'module'){ ?>
										<div class="hikashop_cart_product_quantity_delete">
											<a href="<?php echo hikashop_completeLink('product&task=updatecart&product_id='.$row->product_id.$url_itemid.'&quantity=0&return_url='.urlencode(base64_encode(hikashop_currentURL('return_url')))); ?>" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if(qty_field){qty_field.value=0; <?php echo $input; ?> qty_field.form.submit();} return false;" title="<?php echo JText::_('HIKA_DELETE'); ?>">
												<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" />
											</a>
										</div>
									<?php }
								?>
							</td>
							<?php }
							if($this->params->get('show_price',1)){ ?>
							<td class="hikashop_cart_module_product_price_value hikashop_cart_value">
								<?php
								$this->row=&$row;
								echo $this->loadTemplate();
								?>
							</td>
							<?php }
							if($this->params->get('show_cart_delete',1)){ ?>
							<td class="hikashop_cart_module_product_delete_value hikashop_cart_value">
								<a href="<?php echo hikashop_completeLink('product&task=updatecart&cart_type='.$this->params->get('cart_type','cart').'&cart_product_id='.$row->cart_product_id.'&quantity=0&return_url='.urlencode(base64_encode(urldecode($this->params->get('url'))))); ?>" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if(qty_field){qty_field.value=0;<?php echo $input; ?> document.hikashop_cart_form.submit(); return false;}else{ return true;}"  title="<?php echo JText::_('HIKA_DELETE'); ?>"><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" /></a>
							</td>
							<?php }
							if($cart_type == 'wishlist' && $this->params->get('from','display') != 'module'){ ?>
								<td class="hikashop_wishlist_display_add_to_cart">
									<!-- Add 'ADD_TO_CART' button -->
									<?php
									$form = ',\'hikashop_wishlist_form\'';

									$this->ajax = '
										if(qty_field == null){
											var qty_field = document.getElementById(\'hikashop_wishlist_quantity_'.$row->cart_product_id.'\').value;
										}
										if(hikashopCheckChangeForm(\'item\',\'hikashop_wishlist_form\')){
											return hikashopModifyQuantity(\'' . $this->row->product_id . '\',qty_field,1,\'hikashop_wishlist_form\',\'cart\');
										} else {
											return false;
										}
									';

									$this->setLayout('quantity');
									echo $this->loadTemplate();
									$this->setLayout('listing_price');
									?>
								</td>
							<?php }
							if($row_count<1){ ?>
							<td></td>
							<?php }?>
						</tr>
						<?php
						$k = 1-$k;
					}
					$this->cart_product_price=false;
				?>
			</tbody>
		</table>
			<?php
			if($this->params->get('show_cart_quantity',1)){ ?>
				<noscript>
					<input type="submit" class="btn button" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
				</noscript>
			<?php }
		if($this->params->get('cart_type','cart') != 'wishlist'  && $this->params->get('from','display') == 'module'){
			if($this->params->get('show_cart_proceed',1)) echo $this->cart->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'checkout',$this->params,$url_checkout,'');
		}
		else{
			?><div class="hikashop_display_cart_show_convert_button"><?php
			$cart_type = '&cart_type='.$this->params->get('cart_type','cart');
			if($this->params->get('from','display') != 'module'){
				//echo $this->cart->displayButton(JText::_('NEW_WISHLIST'),'wishlist',$this->params,hikashop_completeLink('wishlist&task=newWishlist'.$url_itemid.$cart_type),'');
				echo $this->cart->displayButton($convertText,'wishlist',$this->params,hikashop_completeLink('cart&task=convert'.$url_itemid.$cart_type),'window.location.href = \''.hikashop_completeLink('cart&task=convert'.$url_itemid.$cart_type).'\';return false;');
			}
			else{
				echo $this->cart->displayButton($displayText,'wishlist',$this->params,hikashop_completeLink('cart&task=showcart&cart_id='.$cart_id.$cart_itemid.$cart_type),'window.location.href = \''.hikashop_completeLink('cart&task=showcart&cart_id='.$cart_id.$cart_itemid.$cart_type).'\';return false;');
			}
			?></div><?php
		}
		?>
		<input type="hidden" name="url" value="<?php echo $this->params->get('url');?>"/>
		<input type="hidden" name="ctrl" value="product"/>
		<input type="hidden" name="cart_type" value="<?php echo $this->params->get('cart_type','cart'); ?>"/>
		<input type="hidden" name="task" value="updatecart"/>
	</form>
	<?php } ?>
</div>
<div class="clear_both"></div>
<?php } ?>
<?php
if(JRequest::getWord('tmpl','')=='component'){
	if(!headers_sent()){
		header('Content-Type: text/css; charset=utf-8');
	}
	exit;
}
?>
instead of the current code so that it uses the latest version of the code to display the cart module including the proceed to checkout button and it should work.

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

  • Posts: 45
  • Thank you received: 1
10 years 7 months ago #168584

I replaced the contents of the Display -> Views Product/ Cart with the code your provided and I get the same results. 403 errors from non-product category pages with system SEF and Modules Anywhere are still disabled. I still get the 404 error with system SEF enabled

PM me if you want me to give admin access to my test site.

Paul

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

  • Posts: 26219
  • Thank you received: 4034
  • MODERATOR
10 years 7 months ago #168673

Hi,

You're right, it can be useful to have some access to your Joomla backend.
You can send me a private message with the link of this thread and I will update your issue ticket.

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: 26219
  • Thank you received: 4034
  • MODERATOR
10 years 7 months ago #168817

Hi,

We tried to log-in but we got the message.

You do not have access to the administrator section of this site.

Did you add the IP address I gave you by private message ?

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: 45
  • Thank you received: 1
10 years 7 months ago #170037

Have you been able to access the site now after I made the changes?

Paul

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

  • Posts: 45
  • Thank you received: 1
10 years 6 months ago #171902

Gentlemen,

It appears that this issue has gone cold. It does not appear that you have attempted to log into our development site and I have yet to receive any further updates or a resolution to this problems. As it stands now we cannot upgrade to Hikashop 2.3.2 and the lack of movement on this case has us wondering if Hikashop is a viable shopping cart system for our site going forward.

Paul Cappelloni

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

  • Posts: 12953
  • Thank you received: 1778
10 years 6 months ago #171964

Hello,
Sorry for the late reply, I've done some tests on your website and fixed it before you replied.
Your issue was coming from the un-used 'Track Charts" menu which had the ID number 269. That menu item had some wrong data in the database. Using the "Rebuild" button of the Joomla menu manager fixed your issue.

Last edit: 10 years 6 months ago by nicolas.

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

  • Posts: 45
  • Thank you received: 1
10 years 6 months ago #171999

I am not seeing your last post but I have tried to recreate the issue today and it is not occurring. I am not sure why it isn't since I did not make any major changes on the site.

In the past I was able to easily recreate the problem by adding a product to the cart from within an article such as this one:

testdev.erielackhs.org/joomla/index.php?...&catid=23&Itemid=230

I would then check the "Proceed to Checkout" in the cart module on the left from either the article or home page. That was generating the 404 error. The only time I didn't get a 404 error was if I clicked the checkout link from any product category page. I do see that HikaShop Support logged into the site today, 2014-09-17 at 09:52:25 EDT.

Paul

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

  • Posts: 45
  • Thank you received: 1
10 years 6 months ago #172016

Thank you for finding that and making the corrections in our test site. So if I understand you correctly you selected the Track Charts menu manage and just click the rebuild icon and that corrected the issue? I am trying that now on a local development system and I still have the same 404 issue with the redirect to the to ../erielackhs/index.php/TrackCharts/product/updatecart.

Did you perform any SQL queries that altered the menu table before you issue the rebuild from the menu manager?

Paul

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

  • Posts: 26219
  • Thank you received: 4034
  • MODERATOR
10 years 6 months ago #172018

Hi,

Your issue was in fact a Joomla issue, not an HikaShop one.
If you menu structure is broken, the itemId that HikaShop retrieve to generate correct links ; become broken too.
The "rebuild" button is a Joomla button in your Joomla backend, when you manage your menus.

The problem was just that and like I said, nothing related to HikaShop ; just your joomla menus.

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.

Time to create page: 0.125 seconds
Powered by Kunena Forum