Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 10-20-2009 11:32:45

chuck6478
Member
From: Missouri
Registered: 09-05-2009
Posts: 119
Website

Product listing with add button without image

wwwthreedogsportinggoods.com

Preferable method:
I have a product that has 50+ size options each with a different part number. I first tried setting up a single product with discrete options using a radio button list, but there where three issues.
1) The display is a little messy because there is no part number at the product level
2) I'm not able to provide a part number for the option.
3) The order does not show the base price and the upcharge for the option

Example:  Redding Bushing Style Dies -> Bushing Neck Die -> 17 Remington Fireball


Second choice:
The category has the image. I will have approx 50 products listed under it and do not need nor want to display the image. I would like to have a single line with the product part number and name along with an add button but don't see how it can be done. Ideally, I would have a single line for each product.
Part#    Name    List Price    Reg Price   [Add to Cart]  [Add to Wishlist]

Example:  Redding Bushing Style Dies ->Full Bushing Die

Any suggestions?

Last edited by chuck6478 (10-20-2009 11:34:18)

Offline

 

#2 10-20-2009 13:19:41

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Product listing with add button without image

Clone the no image display and add this some where near the top

Code:

// +--
// | Set our add_ok flag.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

and this at the bottom


Code:

if ($add_ok) {

     if (!(empty($proddisp['xprodoptions']))) {

          $link = $this->link_namespace('ecom','prodshow',array('ref' => $proddisp['id']));

          print '<form action="' . $link . '" id="' . $this->xhtml_encode($proddisp['id']) . '" method="post">';
          print '<p class="quickform"><input class="quickbutton" type="submit" name="' . $this->xhtml_encode($proddisp['id']) . '" ';
          print 'id="' . $this->xhtml_encode($proddisp['id']) . '--SUBMIT" value="Add With Options" /></p></form>' . $eol;

     } else {

          $this->xhtml_quickform_header($formid,'ecom','addcart',array());

          print '<p class="hidden"><label for="' . $formid . '--quantity';
          print '" class="hidden">Quantity</label></p>' . $eol;
          print '<p class="hidden"><input type="hidden" name="';
          print $formid . '--quantity" id="' . $formid . '--quantity';
          print '" value="1" /></p>' . $eol;

          $this->include_namespace('ecom','prodshowoptlite',array('form' => $formid, 'showquan' => 0, 'headfoot' => 0));

          $this->xhtml_quickform_footer($formid,'Add To Cart',1);

     } // End of if statement.

Offline

 

#3 10-20-2009 13:49:33

chuck6478
Member
From: Missouri
Registered: 09-05-2009
Posts: 119
Website

Re: Product listing with add button without image

I appreciate the code. As I'm new to all this I don't know what file I should be working in. Can you point me in the right direction please?

Thanks

Offline

 

#4 10-20-2009 14:27:48

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Product listing with add button without image

You will find one at System Dashboard > Store > Store Displays > Product List Displays and the other at System Dashboard > Store > Store Displays > Product Detail Displays. You will need to make a new display in both places, once that is done you will have to set the product to use those display.

John

Offline

 

#5 10-20-2009 16:44:42

chuck6478
Member
From: Missouri
Registered: 09-05-2009
Posts: 119
Website

Re: Product listing with add button without image

Thanks for the assist.

I'm getting it now.

Offline

 

#6 10-20-2009 17:27:28

chuck6478
Member
From: Missouri
Registered: 09-05-2009
Posts: 119
Website

Re: Product listing with add button without image

You know what they say about good deeds? No good deed goes unpunished.

I've impleemnted the code but there seems to be a problem. The following if statement is always true even though there are no options defined.

     if (!(empty($proddisp['xprodoptions']))) {

consequently I always get a button with the caption "Add with options".

The "else" portion of the statement doesn't seem to have anything for a button.

Offline

 

#7 10-20-2009 18:54:21

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Product listing with add button without image

In the else part of the statement the button is built thru this statement

Code:

$this->include_namespace('ecom','prodshowoptlite',array('form' => $formid, 'showquan' => 0, 'headfoot' => 0));

what I posted is in all the displays that include the buttons, I just copied and pasted them here. If you just did it like this (at the bottom)

Code:

if ($add_ok) {

          $this->xhtml_quickform_header($formid,'ecom','addcart',array());

          print '<p class="hidden"><label for="' . $formid . '--quantity';
          print '" class="hidden">Quantity</label></p>' . $eol;
          print '<p class="hidden"><input type="hidden" name="';
          print $formid . '--quantity" id="' . $formid . '--quantity';
          print '" value="1" /></p>' . $eol;

          $this->include_namespace('ecom','prodshowoptlite',array('form' => $formid, 'showquan' => 0, 'headfoot' => 0));

          $this->xhtml_quickform_footer($formid,'Add To Cart',1);

     } // End of if statement.

you should get the old option display.

John

Offline

 

#8 10-21-2009 07:44:23

chuck6478
Member
From: Missouri
Registered: 09-05-2009
Posts: 119
Website

Re: Product listing with add button without image

It's working now.

Thanks

Offline

 

Board footer