Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / shopping cart contents

shopping cart contents

Locked

Views: 1,396

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
7 Nov 2009, 3:59 PM
#1
stitchnkitty avatar

stitchnkitty

Totally Zenned

Join Date:
Jun 2009
Location:
Des Moines, Iowa USA
Posts:
618
Plugin Contributions:
0

shopping cart contents

Hi all
in the check out -
Shopping cart contents page- the item name is just that -
How can I get a better discription of the ordered items to include manufacture; item numberand skill type.

Ideas please
www,, stitchnframeonline,,com/snfcart is the current location of my site.

TIA

7 Nov 2009, 5:39 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: shopping cart contents

There are a few ways of doing this. I do not think that it is possible without some coding but hey I've been wrong before.

One way is this:

You are going to have to edit a file called includes/modules/pages/shopping_cart/header.php

At about line 132 you will find:

  $linkProductsName = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']);

Add underneath it like so:

  $linkProductsName = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']);
	$productsDescription= zen_get_products_description($products[$i]['id']);

Then about line 145 you'll find where the array is built under product name add this:

                            'linkProductsName'=>$linkProductsName,
				'productsDescription'=>$productsDescription, 
                            'productsImage'=>$productsImage,

What you have done so far is add the product description to the array that is used to create the page.

Now you can reference this wherever you wish in the page. So in includes/templates/yourtemplate/templates/tpl_shopping_cart_default.php (if this file does not exist then you need to create it as an override)

Find line 85 ish:

<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>

You are going to add the description under the name and the out off stock warning for instance. So change that to:

<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'.'<br/>'.$product['productsDescription']; ?></span></a>

Then you can repeat that process for any other fields you want to use. Product ID is easier because it is already in the array as $product['id']so you don't have to do the first steps. Skill type - huh?

8 Nov 2009, 2:28 PM
#3
stitchnkitty avatar

stitchnkitty

Totally Zenned

Join Date:
Jun 2009
Location:
Des Moines, Iowa USA
Posts:
618
Plugin Contributions:
0

Re: shopping cart contents

Ok I will try this - i am surprised this has not been an issue before -

10 Nov 2009, 5:00 PM
#4
stitchnkitty avatar

stitchnkitty

Totally Zenned

Join Date:
Jun 2009
Location:
Des Moines, Iowa USA
Posts:
618
Plugin Contributions:
0

Re: shopping cart contents

Ok what I am going for is:
image, Manf, model number, name, skill type

skill type I am trying to construct and is discussed in another thread.

So am i assuming correctly that these fields are within the products table?

image is products_images;
products manf is manf_id
model number is products_model
name is products_id
skill type well that is coming sometime.

Or am I off base and they each tables themselves?

10 Nov 2009, 8:06 PM
#5
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: shopping cart contents

In th products table you have:

products_id
manufacturers_id
products_image
products_model

In the products_description table you have:

products_name

Skill type will be wherever you put it!

11 Nov 2009, 3:22 PM
#6
stitchnkitty avatar

stitchnkitty

Totally Zenned

Join Date:
Jun 2009
Location:
Des Moines, Iowa USA
Posts:
618
Plugin Contributions:
0

Re: shopping cart contents

Being a newbie I copied extactly what you suggested to see what it did! Very nice! but I wanted the model number etc.

so I chose one catagory to change to see what happened and sure enough it did not like it .

So this is what I did : This is to add the model number.

inclludes modules/pages...

line 132ish
$linkProductsName = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']);

$ProductsModel= zen_get_products_model($products[$i]['id']);

line 145ish
'linkProductsName'=>$linkProductsName,
'productsModel'=>$productsModel,

                        'productsImage'=>$productsImage,

then in tpl_shopping_cart_default.php

<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'.'<br/>'.$product['productsModel']; ?></span></a>

I get a white page so it is not liking something I have done or it just does not show the model number. TIA

12 Nov 2009, 2:50 PM
#7
stitchnkitty avatar

stitchnkitty

Totally Zenned

Join Date:
Jun 2009
Location:
Des Moines, Iowa USA
Posts:
618
Plugin Contributions:
0

Re: shopping cart contents

Ok
I does not seem to like the coding for the products_model

possibly because this is a feature within a table and the
productsDescription is a table itself?

12 Nov 2009, 4:16 PM
#8
stitchnkitty avatar

stitchnkitty

Totally Zenned

Join Date:
Jun 2009
Location:
Des Moines, Iowa USA
Posts:
618
Plugin Contributions:
0

Re: shopping cart contents

If I am thinking correctly - the coding above is for a table within my database. It works great.

How do I modify this for a feature within a table:

such as

products
products_model?

help please TIA