Forums / General Questions / how to do this custom coding?

how to do this custom coding?

Started by linjuming on 16 Apr 2012, 7:50 AM · Views: 1,488

Results 1 to 11 of 11
16 Apr 2012, 7:50 AM
#1
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

how to do this custom coding?

zencart provide $options_menu to list products properties such as colors , sizes. but this var is containing html code.
My html deisin must chage the html struture, for this reason I must get the arrray bellow, how to do it ?

18 Apr 2012, 3:16 AM
#2
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?

how to set diffrent prices for the same product with diffrent styles?

18 Apr 2012, 2:01 PM
#3
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

Re: how to do this custom coding?

You could always just set it up so there's the four product options you talked about under one dropdown box, ie instead of having a box for color and a box for size you could have one which has:
blue medium
red medium
blue small
red small

That would mean the user only has to click on one dropdown box as well, which is surely a good thing since there aren't so many choices anyway?

21 Apr 2012, 9:13 AM
#4
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?

how to add shopping cart info on head of site?

2 May 2012, 7:23 AM
#6
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?

the default template list new products by random. the products changes when refresh the page.
now I want to list the latest product by date. how to do it ?

4 May 2012, 10:34 AM
#7
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?

how to add a diy page which can use zencart functions and constants?

the page can use zencart functions and constants.but it must not include any template php files ,such as tpl_header.php.
I want to use this page to do ajax request feedback.

for example:
this page i named it as ajax.php ,
i want to add ajax in product_info page, in js code ,i use jquery,

$.ajax({
url:"http://localhost/includes/templates/my_template/ajax/ajax.php",
...
success: function(html){
$("#hello").html(html)
}
});

if the ajax.php contains head or foot html code, these code are not my needed code,the ajax return code is not clean.

how to add this type of diy page?

8 May 2012, 9:26 AM
#8
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?

only know the product id , such as 10
how to get product name ,image, category id from products_id?
need sql or any zencart function?

8 May 2012, 11:32 AM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,129
Plugin Contributions:
56

Re: how to do this custom coding?

$product_name = zen_get_products_name($product_id[,$language_id=$current_language_id]);
$category_id = zen_get_products_category_id($product_id);
$image = zen_get_products_image($product_id[,$width=SMALL_IMAGE_WIDTH,$height=SMALL_IMAGE_HEIGHT]);

... where the parameters in [brackets] are optional and the default values are shown. All functions are in /includes/functions/functions_lookups.php.

9 May 2012, 12:58 AM
#10
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?

thank you very much

10 May 2012, 3:43 AM
#11
linjuming avatar

linjuming

Zen Follower

Join Date:
Apr 2012
Posts:
151
Plugin Contributions:
0

Re: how to do this custom coding?