Custom link to the product page

  • Posts: 5
  • Thank you received: 0
8 years 10 months ago #202551

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- Error-message(debug-mod must be tuned on) -- : ?

im tring to change the "link to the product page hikashop" in system - configuration - display
What i wana is use a diferent link for every product.
Any way to do this?

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
8 years 10 months ago #202560

Hi,

I'm sorry but I don't understand your question.
There is already one link per product page by default without doing anything.

The following user(s) said Thank You: abealpha

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

  • Posts: 5
  • Thank you received: 0
8 years 10 months ago #202633

I use the joomla core articles to make the products, putting Add to cart HTML link: <a class = "hikashop_html_add_to_cart_link" href = ".....
When I'm in the checkout and pulse one of the items in my car will not go to the core joomla article
any way to do this?

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
8 years 10 months ago #202635

Hi,

The HikaShop product pages are managed by HikaShop itself and it is not using Joomla articles.
If you want to do so ; it won't be easy to manage but it is possible.
You have to use the "canonical url" in the product configuration to specify the URL that the HikaShop link system will use.
To force the use of the canonical url, you have to configure it in the HikaShop configuration.
For product which does not have canonical url, HikaShop will create one but you will be able to change them to point to whatever you want to ; even a Joomla article.

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.
The following user(s) said Thank You: abealpha

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

  • Posts: 5
  • Thank you received: 0
8 years 10 months ago #202718

thank you very much, it is the first e-commerce forum in joomla I get a serious answer.
But... do not use HikaShop think, because I have found on the web the <html> <head> writes around 300 lines and the truth is I am very disappointed by that. :pinch:
Why not put a hika.css and hika.js in external files?

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
8 years 10 months ago #202728

Hi,

HikaShop has external CSS and JS files for things which can be externalized. If you look at your head, you can see media/com_hikashop/css/frontend_default.css and media/com_hikashop/js/hikashop.js which are the main css and js files of HikaShop (and you might also find other CSS and js files from HikaShop there for specific functions).
HikaShop also adds some dynamic CSS and JS to the head when necessary. The quantity of the dynamic CSS/JS code added depends on how you configure HikaShop.
We do that as the CSS/JS is dynamic and thus cannot be in external files as the code need to change based on how you configure HikaShop.

Having CSS/JS in the head is not necessarily wrong. It is usually better to have CSS/JS in an external file so that it can be loaded only once and reused on other pages so that you only have one central place to modify it. But in the case of dynamic CSS/JS, the code changes anyway from one page to another and thus having it in external files would actually increase the load time of the page and would actually be counter productive.

Good practice rules are important so that people not knowing what they are doing or learning can follow them to produce elegant results. But that doesn't mean that they are cases where it makes sense to go against these rules.
For example:
Inline CSS should be avoided as much as possible in HTML and you should instead add your CSS with classes/ids either from an external CSS file or in the head of the page.
But when you send an email with HTML in it, it is actually better to only have inline CSS in your HTML in order to guarantee a greater compatibility with email clients.

The following user(s) said Thank You: abealpha

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

  • Posts: 5
  • Thank you received: 0
8 years 10 months ago #202762

Any way to work without dinamic?

  <style type="text/css">
#hikashop_category_information_module_97 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_97 .hikashop_rtop *,#hikashop_category_information_module_97 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_97 div.hikashop_subcontainer,#hikashop_category_information_module_97 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_97 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_97 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_97 div.hikashop_category,#hikashop_category_information_module_97 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_97 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			

#hikashop_category_information_module_98 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_98 .hikashop_rtop *,#hikashop_category_information_module_98 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_98 div.hikashop_subcontainer,#hikashop_category_information_module_98 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_98 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_98 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_98 div.hikashop_category,#hikashop_category_information_module_98 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_98 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			

#hikashop_category_information_module_99 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_99 .hikashop_rtop *,#hikashop_category_information_module_99 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_99 div.hikashop_subcontainer,#hikashop_category_information_module_99 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_99 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_99 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_99 div.hikashop_category,#hikashop_category_information_module_99 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_99 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			

#hikashop_category_information_module_107 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_107 .hikashop_rtop *,#hikashop_category_information_module_107 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_107 div.hikashop_subcontainer,#hikashop_category_information_module_107 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_107 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_107 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_107 div.hikashop_category,#hikashop_category_information_module_107 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_107 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			

#hikashop_category_information_module_101 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_101 .hikashop_rtop *,#hikashop_category_information_module_101 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_101 div.hikashop_subcontainer,#hikashop_category_information_module_101 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_101 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_101 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_101 div.hikashop_category,#hikashop_category_information_module_101 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_101 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			

#hikashop_category_information_module_108 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_108 .hikashop_rtop *,#hikashop_category_information_module_108 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_108 div.hikashop_subcontainer,#hikashop_category_information_module_108 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_108 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_108 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_108 div.hikashop_category,#hikashop_category_information_module_108 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_108 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			
  </style>
  <script src="/e/media/jui/js/jquery.min.js" type="text/javascript"></script>
  <script src="/e/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
  <script src="/e/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>
  <script src="/e/media/system/js/caption.js" type="text/javascript"></script>
  <script src="/e/media/system/js/core.js" type="text/javascript"></script>
  <script src="/e/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="/e/media/com_hikashop/js/hikashop.js?v=240" type="text/javascript"></script>

  <script type="text/javascript">
jQuery(window).on('load',  function() {
				
			});
jQuery(document).ready(function(){
	jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
});
		jQuery(function($) {
			SqueezeBox.initialize({});
			SqueezeBox.assign($('a.modal').get(), {
				parse: 'rel'
			});
		});
		function jModalClose() {
			SqueezeBox.close();
		}
<!--

	function hikashopModifyQuantity(id,obj,add,form,type,moduleid){
		var d = document, cart_type="cart", addStr="", qty=1, e = null;
		if(type) cart_type = type;
		if(add) addStr = "&add=1";

		if(moduleid === undefined) moduleid = 0;

		if(obj){
			qty = parseInt(obj.value);
		}else if(document.getElementById("hikashop_product_quantity_field_"+id) && document.getElementById("hikashop_product_quantity_field_"+id).value){
			qty = document.getElementById("hikashop_product_quantity_field_"+id).value;
		}
		if(form && document[form]){
			var varform = document[form];
			e = d.getElementById("hikashop_cart_type_"+id+"_"+moduleid);

			if(!e)
				e = d.getElementById("hikashop_cart_type_"+id);
			if(cart_type == "wishlist"){
				if(e) e.value = "wishlist";
				if(varform.cid) varform.cid.value = id;
				f = d.getElementById("type");
				if(f) f.value = "wishlist";
			}else{
				if(e) e.value = "cart";
				if(varform.cid) varform.cid.value = id;
			}
			if(varform.task) {
				varform.task.value = "updatecart";
			}

			var input = document.createElement("input");
			input.type = "hidden";
			input.name = "from_form";
			input.value = "true";
			varform.appendChild(input);

			varform.submit();
		}else{
			if(qty){
				
							if(cart_type == "wishlist"){
								SqueezeBox.fromElement("hikashop_notice_wishlist_box_trigger_link",{parse: "rel"});
							} else {
								SqueezeBox.fromElement("hikashop_notice_box_trigger_link",{parse: "rel"});
							}
						
			}
			var url = "/e/index.php/component/hikashop/product/updatecart/tmpl-component?from=module&product_id="+id+"&cart_type="+cart_type+"&hikashop_ajax=1&quantity="+qty+addStr+"&return_url=aHR0cDovL2xvY2FsaG9zdC9lLw%3D%3D";
			var completeFct = function(result) {
				var hikaModule = false;
				var checkmodule = false;
				if(result == "notLogged"){ // if the customer is not logged and use add to wishlist, display a popup for the notice
					SqueezeBox.fromElement("hikashop_notice_wishlist_box_trigger_link",{parse: "rel"});
				}else if(result.indexOf("URL|") != "-1"){ // id the option is set to redirect, do the redirection
					result = result.replace("URL|","");
					window.location = result;
					return false;
				}else if(result != ""){ // if the result is not empty check for the module
					checkmodule = true;
				}
				if(checkmodule){
					if(cart_type != "wishlist") {
						hikaModule = window.document.getElementById("hikashop_cart_module");
					}else{
						hikaModule = window.document.getElementById("hikashop_wishlist_module");
					}
				}
				if(hikaModule) hikaModule.innerHTML = result;
				if(window.jQuery && typeof(jQuery.noConflict) == "function" && !window.hkjQuery) {
					window.hkjQuery = jQuery.noConflict();
				}
				if(window.hkjQuery && typeof(hkjQuery().chosen) == "function") {
					hkjQuery( ".tochosen:not(.chzn-done)" ).removeClass('chzn-done').removeClass('tochosen').chosen();
				}
			};
			try{
				new Ajax(url, {method: "get", onComplete: completeFct}).request();
			}catch(err){
				new Request({url: url, method: "get", onComplete: completeFct}).send();
			}
		}
		return false;
	}

//-->

<!--
var hikashopFieldsJs=Array();
			hikashopFieldsJs['reqFieldsComp']=Array();
			hikashopFieldsJs['validFieldsComp']=Array();
//-->

<!--

			function hikashopToggleFields(new_value,namekey,field_type,id,prefix){
				var arr = new Array();
				var checked = 0;
				arr = document.getElementsByName('data['+field_type+']['+namekey+'][]');
				if(typeof arr[0] != 'undefined' && typeof arr[0].length != 'undefined'){
					var size = arr[0].length;
				}else{
					var size = arr.length;
				}
				if(prefix === undefined || !prefix || prefix.length == 0 || prefix.substr(-1) != '_')
					prefix = 'hikashop_';
				for(var c = 0; c < size; c++){
					if(typeof arr[0] != 'undefined' && typeof arr[0].length != 'undefined'){
						var obj = document.getElementsByName('data['+field_type+']['+namekey+'][]').item(0).item(c);
					}else{
						var obj = document.getElementsByName('data['+field_type+']['+namekey+'][]').item(c);
					}
					if((typeof obj.checked != 'undefined' && obj.checked) || (typeof obj.selected != 'undefined' && obj.selected)){
						checked++;
					}
					if((typeof obj.type != 'undefined' && obj.type=='checkbox')){
						var specialField = true;
					}
				}
				var checkedGood = 0;
				var count = 0;
				if(typeof hikashopFieldsJs != 'undefined' && typeof hikashopFieldsJs[field_type] != 'undefined'){
					for(var k in hikashopFieldsJs[field_type][namekey]) {
						if(typeof hikashopFieldsJs[field_type][namekey][k] == 'object'){
							for(var l in hikashopFieldsJs[field_type][namekey][k]){
								if(typeof hikashopFieldsJs[field_type][namekey][k][l] == 'string'){
									count++;
									newEl = document.getElementById(namekey+'_'+k);
									if(newEl && ((typeof newEl.checked != 'undefined' && newEl.checked) || (typeof newEl.selected != 'undefined' && newEl.selected))){
										checkedGood++;
									}
								}
							}
						}
					}
				}
				if(typeof arr[0] != 'undefined' && typeof arr[0].length != 'undefined' && count>1){
					var specialField = true;
				}
				if(typeof hikashopFieldsJs != 'undefined' && typeof hikashopFieldsJs[field_type] != 'undefined'){
					for(var j in hikashopFieldsJs[field_type][namekey]) {
						if(typeof hikashopFieldsJs[field_type][namekey][j] == 'object'){
							for(var i in hikashopFieldsJs[field_type][namekey][j]){
								if(typeof hikashopFieldsJs[field_type][namekey][j][i] == 'string'){
									var elementName = prefix+field_type+'_'+hikashopFieldsJs[field_type][namekey][j][i];
									if(id){
										elementName = elementName + '_' + id;
									}
									el = document.getElementById(elementName);
									if(!el) continue;
									if(specialField){
										if(checkedGood==count && checkedGood==checked && new_value!=''){
											el.style.display='';
											hikashopToggleFields(el.value,hikashopFieldsJs[field_type][namekey][j][i],field_type,id,prefix);
										}else{
											el.style.display='none';
											hikashopToggleFields('',hikashopFieldsJs[field_type][namekey][j][i],field_type,id,prefix);
										}
									}else{
										if(j==new_value){
											el.style.display='';
											hikashopToggleFields(el.value,hikashopFieldsJs[field_type][namekey][j][i],field_type,id,prefix);
										}else{
											el.style.display='none';
											hikashopToggleFields('',hikashopFieldsJs[field_type][namekey][j][i],field_type,id,prefix);
										}
									}
								}
							}
						}
					}
				}
			}
//-->

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

  • Posts: 5
  • Thank you received: 0
8 years 10 months ago #202763

sry ddnt search
link
Will try some thinks now, thanks for ur answers :lol:

Last edit: 8 years 10 months ago by abealpha.

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
8 years 10 months ago #202799

Hi,

The dynamic CSS from the header can be removed like that:
www.hikashop.com/forum/product-category-...ader-css.html#177375
This however means that some CSS will be missing from the pages and it might not display like you want anymore.

The following user(s) said Thank You: abealpha

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

Time to create page: 0.073 seconds
Powered by Kunena Forum