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 01-21-2010 09:49:31

grcauto
Member
From: Bloomsburg, PA
Registered: 09-11-2006
Posts: 128
Website

Need code

Hello,
I need the original code for the 'product price display' include, for the 'shopping cart/wish list display' and the 'all.css' for the E-Commerce Skin.
Thanks,

Last edited by grcauto (01-21-2010 14:11:46)

Offline

 

#2 01-21-2010 16:36:24

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Need code




// pricedisplay.php


Code:

<?php 

$app       = $this->globals('khxc_display.app');
$eol       = $this->globals('khxc.eol');
$priceinfo = $this->globals('ecom.prod_priceinfo');
$proddisp  = $this->globals('ecom.prod_proddisp');
$eutax_text = $this->globals('eutax_text');

// +--
// | Only display valid prices.
// +--

if (!(empty($priceinfo['type']))) {

     // +--
     // | Display wholesale prices.
     // +--

     if ($priceinfo['type'] == 'W') {

          if (($eutax_text['displayboth']) && ($eutax_text['zero']) && ($priceinfo['displayb'] == $priceinfo['displaybeutax'])) {
              print '<div class="khxc_pricediv"><p class="inline">Retail: </p>';
              print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybx']) . $this->xhtml_encode($eutax_text['zerotext']);
              print '</p></div>' . $eol . $eol;

              print '<div class="khxc_pricediv"><p class="inline">Wholesale: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']) . $this->xhtml_encode($eutax_text['zerotext']);
              print '</p></div>' . $eol . $eol;
          } else {
          print '<div class="khxc_pricediv"><p class="inline">Retail: </p>';
          print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybx']) . $this->xhtml_encode($eutax_text['first']);
          print '</p></div>' . $eol . $eol;

          print '<div class="khxc_pricediv"><p class="inline">Wholesale: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']) . $this->xhtml_encode($eutax_text['first']);
          print '</p></div>' . $eol . $eol;
            if ($eutax_text['displayboth']) {
                print '<div class="khxc_pricediv"><p class="inline">Retail: </p>';
              print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybxeutax']) . $this->xhtml_encode($eutax_text['second']);
              print '</p></div>' . $eol . $eol;

              print '<div class="khxc_pricediv"><p class="inline">Wholesale: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displaybeutax']) . $this->xhtml_encode($eutax_text['second']);
             print '</p></div>' . $eol . $eol;
            }// End of if statement.
          }// End of if statement. 


     // +--
     // | Display sale prices.
     // +--

     } elseif ($priceinfo['type'] == 'S') {

          if (($eutax_text['displayboth']) && ($eutax_text['zero']) && ($priceinfo['displayb'] == $priceinfo['displaybeutax'])) {
              print '<div class="khxc_pricediv"><p class="inline">Regularly: </p>';
              print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybx']) . $this->xhtml_encode($eutax_text['zerotext']);
              print '</p></div>' . $eol . $eol;

              print '<div class="khxc_pricediv"><p class="inline">On Sale: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']) . $this->xhtml_encode($eutax_text['zerotext']);
              print '</p></div>' . $eol . $eol;
          } else {
          print '<div class="khxc_pricediv"><p class="inline">Regularly: </p>';
          print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybx']) . $this->xhtml_encode($eutax_text['first']);
          print '</p></div>' . $eol . $eol;

          print '<div class="khxc_pricediv"><p class="inline">On Sale: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']) . $this->xhtml_encode($eutax_text['first']);
          print '</p></div>' . $eol . $eol;
            if ($eutax_text['displayboth']) {
              print '<div class="khxc_pricediv"><p class="inline">Regularly: </p>';
              print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybxeutax']) . $this->xhtml_encode($eutax_text['second']);
          print '</p></div>' . $eol . $eol;

              print '<div class="khxc_pricediv"><p class="inline">On Sale: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displaybeutax']) . $this->xhtml_encode($eutax_text['second']);
              print '</p></div>' . $eol . $eol;
            }// End of if statement.
          }// End of if statement. 

     // +--
     // | Display regular prices.
     // +--

     } elseif ($priceinfo['type'] == 'R') {

          if (($eutax_text['displayboth']) && ($eutax_text['zero']) && ($priceinfo['displayb'] == $priceinfo['displaybeutax'])) {
              print '<div class="khxc_pricediv"><p class="inline">Price: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']) . $this->xhtml_encode($eutax_text['zerotext']);
              print '</p></div>' . $eol . $eol;
              
          } else {
          print '<div class="khxc_pricediv"><p class="inline">Price: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']) . $this->xhtml_encode($eutax_text['first']);
            print '</p></div>' . $eol . $eol;
            if ($eutax_text['displayboth']) {
              print '<div class="khxc_pricediv"><p class="inline">Price: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displaybeutax']) . $this->xhtml_encode($eutax_text['second']);
          print '</p></div>' . $eol . $eol;
            }// End of if statement.
          }// End of if statement. 
     } elseif ($priceinfo['type'] == 'V') {

          $priceinfo['displayb'] = preg_replace('/\$/','$',$priceinfo['displayb']);

          print '<div class="khxc_pricediv">';
          print $priceinfo['displayb'];
          print '</div>' . $eol . $eol;

     } // End of if statement.

     // +--
     // | Display recurring prices.
     // +--

     if ($priceinfo['displayr']) {

          if (($eutax_text['displayboth']) && ($eutax_text['zero']) && ($priceinfo['displayr'] == $priceinfo['displayreutax'])) {
              print '<div class="khxc_pricediv"><p class="inline">Recurring Charge: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayr']) . $this->xhtml_encode($eutax_text['zerotext']);
              print '</p></div>' . $eol . $eol;
          } else {
          print '<div class="khxc_pricediv"><p class="inline">Recurring Charge: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayr']) . $this->xhtml_encode($eutax_text['first']);
          print '</p></div>' . $eol . $eol;
            if ($eutax_text['displayboth']) {
              print '<div class="khxc_pricediv"><p class="inline">Recurring Charge: </p>';
              print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayreutax']) . $this->xhtml_encode($eutax_text['second']);
              print '</p></div>' . $eol . $eol;
            }// End of if statement.
          }// End of if statement. 

     } // End of if statement.

} // End of if statement.

// +--
// | Display out of stock message if this item is out of stock.
// +--

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {

     print '<div class="khxc_pricediv"><p class="khxc_outstock">This item is currently out of stock.</p>';
     print '</div>' . $eol . $eol;

} // End of if statement.

?>

// all.css - ClickCartPro


Code:

/* +------------------------------------------------------------+ */
/* | General XHTML Elements                                     | */
/* +------------------------------------------------------------+ */

body {
     color: #555555;
     background-color: #F2F2F2;
     font-family: Verdana, Tahoma, Arial, sans-serif;
     font-size: 11px;
     font-weight: normal;
     text-align: left;
     margin: 10px auto 10px auto;
     }

a {
     color: #3872B2;
     font-weight: normal;
     text-decoration: underline;
     cursor: pointer;
     }

p {
     margin: 5px 0px 7px 0px;
     }

sup {
     display: inline;
     padding: 0px;
     vertical-align: super;
     font-size: 8px;
     }

a:hover {
     color: #555555;
     }

fieldset {
     border: none;
     padding: 4px 0px 4px 5px;
    }

fieldset p {
     display: block;
     font-size: 11px;
     margin: 5px 5px 5px 2px;
     }

form {
     margin: 0px 0px 5px 0px;
     }

img {
     border: none;
     }

li {
     padding-bottom: 5px;
     }

/* +------------------------------------------------------------+ */
/* | General XHTML Classes                                      | */
/* +------------------------------------------------------------+ */

.center {
     text-align: center;
     }

.inlinecenter {
     text-align: center;
     }

p.inline {
     display: inline;
     padding: 0px;
     }

.strong {
     font-weight: bold;
     }

.big {
     font-weight: bold;
     font-size: 14px;
     }

.hidden {
     display: none;
     }

a.unfancy {
     color: #3872B2;
     font-weight: normal;
     text-decoration: underline;
     cursor: pointer;
     }

a.unfancy:hover {
     color: #555555;
     }

/* +------------------------------------------------------------+ */
/* | Skin Specific Divs                                         | */
/* +------------------------------------------------------------+ */

#skin_wrapper {
     width: 900px;
     padding: 0px;
     margin: auto;
     }

#skin_ct {
     width: 100%;
     padding: 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     border: 1px solid #999999;
     }

#skin_ct_lcol_head {
     background-color: #FFFFFF;
     padding: 7px 7px 10px 7px;
     margin: 0px;
     vertical-align: top;
     width: 160px;
     }


#skin_ct_rcol_head {
     background-color: #FFFFFF;
     padding: 7px 7px 10px 7px;
     margin: 0px;
     vertical-align: top;
     }

#skin_ct_lcol {
     background-color: #FFFFFF;
     padding: 3px 17px 7px 7px;
     margin: 0px;
     vertical-align: top;
     width: 160px;
     text-align: left;
     }

#skin_ct_mcol {
     background-color: #FFFFFF;
     padding: 7px;
     margin: 0px;
     vertical-align: top;
     }

#skin_ct_rcol {
     background-color: #FFFFFF;
     padding: 3px 7px 7px 17px;
     margin: 0px;
     vertical-align: top;
     width: 160px;
     }

#skin_footer {
     padding: 0px;
     margin-top: 10px;
     text-align: center;
     }

#skin_pgtitle {
     color: #30569D;
     padding: 0px 0px 2px 0px;
     margin: 0px 0px 10px 0px;
     font-weight: bold;
     border-bottom: 1px solid #999999;
     }

#skin_content {
     margin: auto;
     }

/* +------------------------------------------------------------+ */
/* | Skin Specific Classes                                      | */
/* +------------------------------------------------------------+ */

.skin_fenavh {
     color: #30569D;
     padding: 3px 0px 3px 0px;
     margin: 0px;
     border-bottom: 1px solid #999999;
     font-weight: bold;
     }

.skin_fenav ul {
     padding: 0px;
     margin: 8px 0px 10px 0px;
     list-style: none;
     }

.skin_fenav ul li {
     margin: 0px;
     list-style: none;
     }

.skin_fenav ul li a {
     color: #3872B2;
     font-weight: normal;
     display: block;
     text-decoration: none;
     padding: 3px 5px 3px 10px;
     background-image: url('../media/menu_arrow.png');
     background-repeat: no-repeat;
     background-position:  center left;
     }

.skin_fenav ul li a:hover {
     color: #555555;
     background-color: #C2DFFF;
     text-decoration: none;
     }

.skin_headacct {
     width: 100%;
     text-align: right;
     clear: both;
     }

.skin_fenavmini {
     background-color: #F2F2F2;
     padding: 5px;
     margin: 0px 0px 10px 0px;
     border-left: 1px solid #999999;
     border-right: 1px solid #999999;
     border-bottom: 1px solid #999999;
     }

#skin_menu_head ul {
     padding: 0px 0px 4px 0px;
     margin: 0px 0px 4px 0px;
     list-style: none;
     border-bottom: 1px solid #999999;
     }

#skin_menu_head li {
     padding: 0px;
     margin: 0px;
     list-style: none;
     display: inline;
     }

#skin_menu_head ul li a {
     color: #3872B2;
     font-weight: normal;
     text-decoration: none;
     margin: 0px 30px 0px 0px;
     padding: 0px 0px 0px 10px;
     background-image: url('../media/menu_arrow.png');
     background-repeat: no-repeat;
     background-position: center left;
     }

#skin_menu_head ul li a:hover {
     text-decoration: underline;
     }

#skin_headacct {
     padding: 0px 0px 0px 10px;
     background-image: url('../media/menu_arrow.png');
     background-repeat: no-repeat;
     background-position: center left;
}

/* +------------------------------------------------------------+ */
/* | KHXC Required Divs                                         | */
/* +------------------------------------------------------------+ */

#khxc_debug {
     color: #555555;
     background-color: #FFFFFF;
     border-top: 1px solid #999999;
     overflow: hidden;
     padding: 10px;
     margin: 10px auto 10px auto;
     }

#khxc_printable {
     background-color: #FFFFFF;
     border: 1px solid #999999;
     padding: 10px;
     margin: auto;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Messages                            | */
/* +------------------------------------------------------------+ */

.khxc_error {
     color: #FF0000;
     font-weight: bold;
     }

.khxc_confirm {
     color: #339933;
     font-weight: bold;
     }

.khxc_imgfloatrt {
     float: right;
     margin-bottom: 10px;
     margin-left: 10px;
     display: inline;
     }

.khxc_inline {
     display: inline;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Boxed Monospace Code                | */
/* +------------------------------------------------------------+ */

.khxc_preboxed {
     margin: 5px 0px 0px 0px;
     padding: 5px;
     border: 1px solid #999999;
     font-family: Fixed, monospace;
     overflow: hidden;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Form Fields                         | */
/* +------------------------------------------------------------+ */

.khxc_formfieldradcb {
     color: inherit;
     background-color: inherit;
     }

.khxc_formfield {
     background-color: #FFFFFF;
     border: 1px solid #555555;
     margin: 5px 5px 0px 2px;
     font-size: 11px;
     }

.khxc_formfield:hover {
     background-color: #F5F5F5;
     }

.khxc_formfieldp {
     display: block;
     padding: 0px;
     margin: 0px 0px 2px 2px;
     }

.khxc_formfieldpnfs {
     display: block;
     padding: 0px 5px 0px 5px;
     margin: 0px 0px 5px 0px;
     }

.khxc_formfielda {
     display: block;
     padding: 0px 5px 0px 5px;
     margin: 0px 0px 2px 0px;
     }

.khxc_formbutton {
     color: #555555;
     background-color: #DEDEDE;
     padding: 1px;
     margin: 0px 0px 5px 0px;
     font-size: 11px;
     width: 130px;
     border: 1px solid #555555;
     }

.khxc_formbutton:hover {
     color: #555555;
     background-color: #EBF1FF;
     }

.khxc_quickbutton {
     color: #555555;
     background-color: #DEDEDE;
     padding: 1px;
     margin: 0px;
     font-size: 11px;
     width: 130px;
     border: 1px solid #555555;
     }

.khxc_quickbutton:hover {
     color: #555555;
     background-color: #EBF1FF;
     }

.khxc_quickform {
     margin: 5px 0px 0px 0px;
     }

.khxc_quickfield {
     background-color: #FFFFFF;
     border: 1px solid #555555;
     font-size: 11px;
     margin: 1px 0px 0px 0px;
     }

.khxc_quickfield:hover {
     background-color: #EFEFEF;
     }

.khxc_formfieldradcb_rnc {
     background-color: #FFA4A4;
     }

.khxc_formfield_rnc {
     background-color: #FFA4A4;
     border: 1px solid #555555;
     font-size: 11px;
     margin: 5px 5px 0px 2px;
     }

.khxc_formfield_rnc:hover {
     background-color: #EFEFEF;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Form Table Displays                 | */
/* +------------------------------------------------------------+ */

.khxc_formsecthead {
     color: #FF6600;
     margin: 5px 0px 10px 0px;
     padding: 4px 5px 4px 0px;
     border-bottom: 1px solid #999999;
     font-weight: bold;
     }

table.khxc_formtblone {
     margin: 0px 0px 10px 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

table.khxc_formtbltwo {
     margin: 0px 0px 10px 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

td.khxc_formtbltwo {
     padding: 4px 2px 4px 2px;
     width: 50%;
     vertical-align: top;
     border-bottom: 1px solid #DEDEDE;
     }

td.khxc_formtbltwospan {
     padding: 4px 2px 4px 2px;
     width: 100%;
     vertical-align: top;
     border-bottom: 1px solid #DEDEDE;
     }

td.khxc_formtblone {
     padding: 4px 2px 4px 2px;
     width: 100%;
     vertical-align: top;
     border-bottom: 1px solid #DEDEDE;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Sort Table Displays                 | */
/* +------------------------------------------------------------+ */

table.khxc_sorttable {
     margin: 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

th.khxc_sorttable {
     padding: 4px 5px 4px 5px;
     border-bottom: 1px solid #DEDEDE;
     vertical-align: top;
     font-weight: bold;
     }

td.khxc_sorttable {
     padding: 4px 5px 4px 5px;
     border-bottom: 1px solid #DEDEDE;
     vertical-align: top;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Regular Table Displays              | */
/* +------------------------------------------------------------+ */

.khxc_regtablehead {
     color: #FF6600;
     margin: 5px 0px 10px 0px;
     padding: 4px 5px 4px 0px;
     border-bottom: 1px solid #999999;
     font-weight: bold;
     clear: both;
     }

table.khxc_regtable {
     margin: 0px 0px 10px 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

td.khxc_regtable {
     padding: 4px 2px 4px 2px;
     vertical-align: top;
     border-bottom: 1px solid #DEDEDE;
     }

.khxc_regtable p {
     padding: 0px;
     margin: 0px 0px 5px 0px;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Ghost Table Displays                | */
/* +------------------------------------------------------------+ */

table.khxc_ghost {
     margin: 0px;
     padding: 0px;
     border-spacing: 3px;
     border-collapse: collapse;
     width: 100%;
     }

td.khxc_ghost {
     padding: 0px;
     margin: 0px;
     vertical-align: top;
     }

.khxc_ghost form {
     display: inline;
}

td.khxc_ghost img {
     margin-right: 10px;
     margin-bottom: 10px;
     }

td.khxc_ghost p {
     margin: 0px 0px 6px 0px;
}

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Boxed Paragraphs                    | */
/* +------------------------------------------------------------+ */

p.khxc_ultablesp {
     margin: 0px;
     font-size: 1px;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Online Store Displays               | */
/* +------------------------------------------------------------+ */

.khxc_storehead {
     color: #FF6600;
     margin: 5px 0px 10px 0px;
     padding: 4px 5px 4px 0px;
     border-bottom: 1px solid #999999;
     font-weight: bold;
     clear: both;
     }

.khxc_storelink {
     color: #666666;
     background-color: #F2F2F2;
     margin: 5px 0px 10px 0px;
     padding: 4px 5px 4px 5px;
     border: 1px solid #999999;
     }

.khxc_storelink p {
     color: #666666;
     margin: 0px;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Category List Display Tables        | */
/* +------------------------------------------------------------+ */

table.khxc_cptbl_cat {
     margin: 0px 0px 10px 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

td.khxc_cptbl_cat {
     padding: 5px 0px 0px 0px;
     vertical-align: top;
     border-bottom: 1px solid #DEDEDE;
     }

td.khxc_cptbl_cat a {
     font-weight: bold;
     }

td.khxc_cptbl_cat_blank {
     display: none;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Product List Display Tables         | */
/* +------------------------------------------------------------+ */

table.khxc_cptbl_prod {
     margin: 0px 0px 10px 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

td.khxc_cptbl_prod {
     padding: 5px 0px 0px 0px;
     vertical-align: top;
     border-bottom: 1px solid #DEDEDE;
     }

td.khxc_cptbl_prod a {
     font-weight: bold;
     }

td.khxc_cptbl_prod_blank {
     display: none;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Product Detail Display Tables       | */
/* +------------------------------------------------------------+ */

table.khxc_cptbl_det {
     margin: 0px 0px 10px 0px;
     border-spacing: 0px;
     border-collapse: collapse;
     width: 100%;
     }

td.khxc_cptbl_det {
     padding: 5px 0px 0px 0px;
     vertical-align: top;
     }

td.khxc_cptbl_det_blank {
     display: none;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Price Displays                      | */
/* +------------------------------------------------------------+ */

.khxc_pricediv {
     margin: 5px 0px 7px 0px;
     }

.khxc_price {
     color: #FF6600;
     font-weight: bold;
     display: inline;
     }

.khxc_pricex {
     color: #FF0000;
     font-weight: bold;
     display: inline;
     text-decoration: line-through;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Shopping Cart Displays              | */
/* +------------------------------------------------------------+ */

.khxc_cartbutton {
     color: #555555;
     background-color: #DEDEDE;
     padding: 1px;
     font-size: 11px;
     font-weight: normal;
     text-align: center;
     display: block;
     margin: 0px 0px 5px 0px;
     width: 125px;
     border: 1px solid #555555;
     text-decoration: none;
     }

.khxc_cartbutton:hover {
     color: #555555;
     background-color: #EBF1FF;
     text-decoration: none;
     cursor: default;
     }

/* +------------------------------------------------------------+ */
/* | KHXC Required Classes: Misc                                | */
/* +------------------------------------------------------------+ */

.khxc_clearboth {
     clear: both;
     }

.khxc_outstock {
     color: #FF0000;
     }

a.khxc_hrefbutton {
     color: #555555;
     background-color: #DEDEDE;
     padding: 2px 5px 2px 5px;
     font-size: 11px;
     font-weight: normal;
     text-align: center;
     display: block;
     border: 1px solid #555555;
     text-decoration: none;
     }

a.khxc_hrefbutton:hover {
     color: #555555;
     background-color: #EBF1FF;
     text-decoration: none;
     cursor: default;
     }

.khxc_outline {
     border: 1px solid #999999;
     padding: 5px;
     margin-top: 5px;
     }

.khxc_outline p {
     margin: 0px 0px 3px 0px;
}

/* +------------------------------------------------------------+ */
/* | End                                                        | */
/* +------------------------------------------------------------+ */

// cartdisplay.php


Code:

<?php 

$app      = $this->globals('khxc_display.app');
$eol      = $this->globals('khxc.eol');
$ns          = $this->globals('khxc.namespace');
$breads      = $this->globals('khxc_session.' . $app . '.breadcrumbs');
$contshoploc = $this->globals('khxc_settings.' . $app . '.contshoploc');
$type     = $this->globals('ecom.cart_display');
$cart     = $this->globals('ecom.cart_contents');
$imgwidth = $this->globals('khxc_settings.' . $app . '.imgsizeprodcart');
$imgpath  = $this->globals('khxc.path_public') . '/media/' . $app . '/prodsm/';
$optlb       = $this->globals('khxc_settings.' . $app . '.dispprodoptlinebr');
$disablewl   = $this->globals('khxc_settings.' . $app . '.disablewishlist');

$eutax_text = $this->globals('eutax_text');
$showprodnums = 0;
$total_amount_eutax = 0;
$total_amountrec_eutax  = 0;
if ($this->globals('khxc_settings.' . $app . '.dispprodnums')) {
     $showprodnums = 1;
}

if ($type != 'WISHLIST') {$type = 'CART';}

// +--
// | Print the appropriate header.
// +--

if ($type == 'WISHLIST') {

     print '<div class="khxc_storehead">Wish List</div>' . $eol . $eol;

} else {

     print '<div class="khxc_storehead">Shopping Cart</div>' . $eol . $eol;

} // End of if statement.

// +--
// | Figure out if we have any items to display.
// +--

$found = 0;

if (!(empty($cart))) {

     foreach ($cart as $num => $cartdata) {

          if ($cartdata['savetype'] == $type) {$found++;}

     } // End of foreach statement.

} // End of if statement.

// +--
// | Handle where we have no items to display.
// +--

if ((empty($found)) && ($type == 'WISHLIST')) {

     print '<p>Your wish list is currently empty.  A wish list is used to 
            store items that you are interested in, but may not be quite 
            ready to purchase.  You can add items to your wish list anywhere 
            you see an \'Add to Wish List\' button in our online store.
            </p>' . $eol . $eol;

     print '<p class="khxc_ultablesp">&nbsp;</p>' . $eol . $eol;

} elseif (empty($found)) {

     print '<p>Your shopping cart is currently empty.  If you would like to make 
            a purchase today, add items to your shopping cart.
            </p>' . $eol . $eol;

     print '<p class="khxc_ultablesp">&nbsp;</p>' . $eol . $eol;

} // End of if statement.

// +--
// | Now handle the real display.
// +--

if (!(empty($found))) {

     // +--
     // | Print the form header.
     // +--

     $formid   = $app . '--' . $type . '--updatecart';
     $typeid   = $app . '--updatecart--type';

     $this->xhtml_quickform_header($formid,$app,'updatecart',array($typeid => $type));

     // +--
     // | Define our names and links.
     // +--

     $delete_name = 'Delete Item';

     if ($type == 'WISHLIST') {

          $move_name   = 'Move to Cart';
          $move_ns     = 'carttowl';

     } else {

          $move_name   = 'Move to Wish List';
          $move_ns     = 'wltocart';

     } // End of if statement.

     // +--
     // | Figure out whether we need to display images or recurring  
     // | charges.
     // +--

     $show_recur = 0;
     $show_imgs  = 0;

     foreach ($cart as $num => $cartdata) {

          if ($cartdata['savetype'] == $type) {

               if ((!(empty($cartdata['imgsm']))) && ($cartdata['imgsm'] != 'none.png')) {

                    if (!(file_exists($imgpath . $cartdata['imgsm']))) {

                         $cart[$num]['imgsm'] = 'none.png';

                    } // End of if statement.

               } // End of if statement.

          } // End of if statement.

     } // End of foreach statement.

     foreach ($cart as $num => $cartdata) {

          if ($cartdata['savetype'] == $type) {

               if ($cartdata['subtotalrec'] > 0) {$show_recur = 1;}
               if ((!(empty($cartdata['imgsm']))) && ($cartdata['imgsm'] != 'none.png')) {$show_imgs = 1;}

          } // End of if statement.

     } // End of foreach statement.

     if (!($this->globals('khxc_settings.' . $app . '.cartdispimg'))) {$show_imgs = 0;}

     // +--
     // | Print the table opener and the th tags.
     // +--

     print '<table id="' . $type . '" class="khxc_sorttable">' . $eol;

     print '<tr class="khxc_sorttable">' . $eol;

     if ($show_imgs) {

          print '<th class="khxc_sorttable" style="width: 10%">Image</th>' . $eol;

     } // End of if statement.

     print '<th class="khxc_sorttable">Item</th>' . $eol;

     if ($show_recur) {

          print '<th class="khxc_sorttable" style="width: 10%">Price</th>' . $eol;
          print '<th class="khxc_sorttable" style="width: 10%">Recurring Charge</th>' . $eol;

     } else {

          print '<th class="khxc_sorttable" style="width: 10%">Price</th>' . $eol;

     } // End of if statement.

     print '<th class="khxc_sorttable" style="width: 10%">Quantity</th>' . $eol;
     print '<th class="khxc_sorttable" style="width: 10%">Actions</th>' . $eol;

     print '</tr>' . $eol;

     // +--
     // | Create total vars.
     // +--

     $total_amount          = 0;
      $total_amount_eutax    = 0;
     $total_amountrec       = 0;
      $total_amountrec_eutax = 0;

     // +--
     // | Loop through the cart contents and print items.
     // +--

     foreach ($cart as $num => $cartdata) {

          if ($cartdata['savetype'] == $type) {

               // +--
               // | Add the product number to the name if we're supposed to
               // | display it.
               // +--

               if ($showprodnums) {$cartdata['name'] = $cartdata['number'] . ' - ' . $cartdata['name'];}

               // +--
               // | Define prices.
               // +--

               if (($eutax_text['displayboth']) && ($eutax_text['zero']) && ($cartdata['subtotal'] == $cartdata['subtotaleutax'])) {
                   $price = $this->include_namespace($app,'getprice',$cartdata['subtotal']) . $eutax_text['zerotext'];
                   $price = $this->xhtml_encode($price);
               } else {
               $price = $this->include_namespace($app,'getprice',$cartdata['subtotal']) . $eutax_text['first'];
               $price = $this->xhtml_encode($price);
                  if ($eutax_text['displayboth']) {
                   $priceeutax = $this->include_namespace($app,'getprice',$cartdata['subtotaleutax']) . $eutax_text['second'];
                   $price .= '<br/> ' . $this->xhtml_encode($priceeutax);
                  }
               }// End of if statement. 

               $total_amount = $total_amount + $cartdata['subtotal'];
               $total_amount_eutax = $total_amount_eutax + $cartdata['subtotaleutax'];

               if ($show_recur) {

                    if (($eutax_text['displayboth']) && ($eutax_text['zero']) && ($cartdata['subtotalrec'] == $cartdata['subtotalreceutax'])) {
                        $pricerec = $this->include_namespace($app,'getprice',$cartdata['subtotalrec']) . $eutax_text['zerotext'];
                        $pricerec = $this->xhtml_encode($pricerec);
                    } else {
                    $pricerec = $this->include_namespace($app,'getprice',$cartdata['subtotalrec']) . $eutax_text['first'];
                    $pricerec = $this->xhtml_encode($pricerec);
                        if ($eutax_text['displayboth']) {
                        $pricereceutax = $this->include_namespace($app,'getprice',$cartdata['subtotalreceutax']) . $eutax_text['second'];
                        $pricerec .= '<br/> ' . $this->xhtml_encode($pricereceutax);
                         }
                    }// End of if statement. 

                    $total_amountrec = $total_amountrec + $cartdata['subtotalrec'];
                    $total_amountrec_eutax = $total_amountrec_eutax + $cartdata['subtotalreceutax'];

               } // End of if statement.

               // +--
               // | Define the link URL.
               // +--

               $link = $cartdata['url'];

               if ($link == 'INTERNAL') {

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

               } elseif ($link == 'REMOTE') {

                    $link = '';

               } // End of if statement.

               // +--
               // | Define the images tag.
               // +--

               if ($show_imgs) {

                    $imgname  = $cartdata['imgsm'];
                    if (empty($imgname)) {$imgname = 'none.png';}

                    if ($imgname == 'none.png') {

                          $imgtag = '&nbsp;';

                    } else {

                          $imgurl   = 'media/' . $app . '/prodsm/' . $imgname;

                          $imgtag   = '<img src="' . $imgurl . '" ';
                          if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
                          $imgtag  .= 'alt="' . $this->xhtml_encode($cartdata['name']) . '" />';

                    } // End of if statement.

               } // End of if statement.

               // +--
               // | Define the product display variable.
               // +--

               $proddisp = $this->xhtml_encode($cartdata['name']);

               if (!(empty($link))) {

                    $proddisp = '<a href="' . $link . '" title="' . $proddisp . '">' . $proddisp . '</a>';

               } else {

                    $proddisp = '<p class="strong">' . $proddisp . '</p>';

               } // End of if statement.

               // +--
               // | Add options to the product display variable.
               // +--

                    if (!(empty($cartdata['optdisp']))) {

                         $xodisp = '';

                         foreach ($cartdata['optdisp'] as $oname => $ovalue) {

                              if (!(empty($ovalue))) {

                               $oname  = $this->xhtml_encode($oname);
                               $ovalue = $this->xhtml_encode($ovalue);

                               $xodisp .= $oname . ': ' . $ovalue;

                               if ($optlb) {$xodisp .= '<br />';} else {$xodisp .= '; ';}

                              } // End of if statement.

                         } // End of foreach statement.

                    $xodisp = preg_replace('/\; $/','',$xodisp);
                    $xodisp = preg_replace('/\<br \/\>$/','',$xodisp);

                         if (!(empty($xodisp))) {

                         $proddisp .= '<p>' . $xodisp . '</p>';

                    } // End of if statement.

               } // End of if statement.

               // +--
               // | Print the table cell.
               // +--

               print '<tr class="khxc_sorttable">' . $eol;

               if ($show_imgs) {

                    print '<td class="khxc_sorttable">' . $imgtag . '</td>' . $eol;

               } // End of if statement.

               print '<td class="khxc_sorttable">' . $proddisp . '</td>' . $eol;

               if ($show_recur) {

                    print '<td class="khxc_sorttable">' . $price . '</td>' . $eol;
                    print '<td class="khxc_sorttable">' . $pricerec . '</td>' . $eol;

               } else {

                    print '<td class="khxc_sorttable">' . $price . '</td>' . $eol;

               } // End of if statement.

               print '<td class="khxc_sorttable">';
               print '<p class="hidden"><label for="' . $app . '--updatecart--quantity--';
               print $cartdata['randid'] . '">Quantity</label></p>' . $eol;
               print '<input class="khxc_quickfield" type="text" name="';
               print $app . '--updatecart--quantity--' . $cartdata['randid'];
               print '" id="' . $app . '--updatecart--quantity--' . $cartdata['randid'];
               print '" value="' . $cartdata['quantity'] . '" size="5" maxlength="5" />' . $eol;
               print '</td>' . $eol;

               $delete_link = $this->link_namespace($app,'deletecart',array('ref' => $cartdata['randid']));
               $move_link   = $this->link_namespace($app,'movecart',array('ref' => $cartdata['randid']));

               print '<td class="khxc_sorttable">';

               print '<a class="khxc_cartbutton" href="' . $delete_link . '" title="';
               print $delete_name . '">' . $delete_name . '</a>' . $eol;

               if ((($type != 'WISHLIST') && (empty($disablewl))) || ($type == 'WISHLIST')) {

               print '<a class="khxc_cartbutton" href="' . $move_link . '" title="';
                    print $move_name . '">' . $move_name . '</a>' . $eol;

               } // End of if statement.

               print '</td>' . $eol;

               print '</tr>' . $eol;

          } // End of if statement.

     } // End of foreach statement.

     // +--
     // | Print totals.
     // +--

     print '<tr class="khxc_sorttable">' . $eol;

     if ($show_imgs) {

          print '<td class="khxc_sorttable"><strong>Total' . ' ' . $eutax_text['first'] . '</strong></td>' . $eol;
          print '<td class="khxc_sorttable">&nbsp;</td>' . $eol;

     } else {

          print '<td class="khxc_sorttable"><strong>Total' . ' ' . $eutax_text['first'] . '</strong></td>' . $eol;

     } // End of if statement.

     if ($show_recur) {

          $total_amount    = $this->include_namespace($app,'getprice',$total_amount);
          $total_amountrec = $this->include_namespace($app,'getprice',$total_amountrec);

          print '<td class="khxc_sorttable"><strong>' . $this->xhtml_encode($total_amount) . '</strong></td>' . $eol;
          print '<td class="khxc_sorttable"><strong>' . $this->xhtml_encode($total_amountrec) . '</strong></td>' . $eol;

     } else {

          $total_amount    = $this->include_namespace($app,'getprice',$total_amount);

          print '<td class="khxc_sorttable"><strong>' . $this->xhtml_encode($total_amount) . '</strong></td>' . $eol;

     } // End of if statement.


     
     print '<td class="khxc_sorttable">&nbsp;</td>' . $eol;

     print '<td class="khxc_sorttable">' . $eol;

     print '<input class="khxc_quickbutton" type="submit" name="SUBMIT" id="' . $formid . '--SUBMIT" ';
     print 'value="Update Quantities" onclick="return DisableSubmit(\'' . $formid . '\');" ';
     print 'onkeypress="return DisableSubmit(\'' . $formid . '\');" />';

     print '</td></tr>' . $eol;
     // +--
     // | Print total for second vat display.
     // +--

     if ($eutax_text['displayboth']) {
     print '<tr class="khxc_sorttable">' . $eol;

     if ($show_imgs) {

          print '<td class="khxc_sorttable" colspan="2"><strong>Total' . ' ' . $eutax_text['second'] . '</strong></td>' . $eol;

     } else {

          print '<td class="khxc_sorttable"><strong>Total' . ' ' . $eutax_text['second'] . '</strong></td>' . $eol;

     } // End of if statement.

     if ($show_recur) {

          $total_amount_eutax    = $this->include_namespace($app,'getprice',$total_amount_eutax);
          $total_amountrec_eutax = $this->include_namespace($app,'getprice',$total_amountrec_eutax);

          print '<td class="khxc_sorttable"><strong>' . $this->xhtml_encode($total_amount_eutax) . '</strong></td>' . $eol;
          print '<td class="khxc_sorttable"><strong>' . $this->xhtml_encode($total_amountrec_eutax) . '</strong></td>' . $eol;

     } else {

          $total_amount_eutax    = $this->include_namespace($app,'getprice',$total_amount_eutax);

          print '<td class="khxc_sorttable"><strong>' . $this->xhtml_encode($total_amount_eutax) . '</strong></td>' . $eol;

     } // End of if statement.

     print '<td class="khxc_sorttable" colspan="2">&nbsp;</td>' . $eol;

     print '</tr>' . $eol;

      
      }

     // +--
     // | Print the table closure.
     // +--

     print '</table>' . $eol;
     print '</form>' . $eol;

     // +--
     // | Print the form closure.
     // +--

     if ($type == 'CART') {

          $link_shop     = $this->link_namespace($app,'splash',array());
          $link_checkout = $this->link_namespace($app,'checkout',array());

          if (($ns == 'addcart') && ($breads) && ($contshoploc != 'SPLASH')) {

              $breads = array_reverse($breads);

              foreach ($breads as $num => $breadinfo) {

                   if (($breadinfo['ns'] == 'prodshow') && ($contshoploc == 'PROD')) {

                        $link_shop = $this->link_namespace($app,'prodshow',array('ref' => $breadinfo['ref']));
                        break 1;

                   } elseif (($breadinfo['ns'] == 'catshow') && ($contshoploc == 'CAT')) {

                        $link_shop = $this->link_namespace($app,'catshow',array('ref' => $breadinfo['ref']));
                        break 1;

     } // End of if statement.

              } // End of foreach statement.

          } // End of if statement.

          print '<table><tr>' . $eol;

          print '<td><form action="' . $link_shop . '" id="CONTSHOP" method="post">';
          print '<p class="khxc_quickform"><input class="khxc_quickbutton" type="submit" name="CONTSHOP" ';
          print 'id="CONTSHOP--SUBMIT" value="Continue Shopping" /></p></form></td>' . $eol;

          print '<td><form action="' . $link_checkout . '" id="CHECKOUT" method="post">';
          print '<p class="khxc_quickform"><input class="khxc_quickbutton" type="submit" name="CHECKOUT" ';
          print 'id="CHECKOUT--SUBMIT" value="Checkout" /></p></form></td>' . $eol;

          print '</tr></table>' . $eol;

          print '<p class="khxc_ultablesp">&nbsp;</p>';

          $this->include_namespace($app,'xmodshipestimator');

     } // End of if statement.

} // End of if statement.

?>

Last edited by Design_Wholesale (01-21-2010 16:39:34)

Offline

 

#3 01-21-2010 18:51:09

grcauto
Member
From: Bloomsburg, PA
Registered: 09-11-2006
Posts: 128
Website

Re: Need code

I only looked at the product price display and your's has twice the code that mine does. Still I copied your's and ran the program and the price displayed had '// all.css - ClickCartPro' echoed below the price. I don't want to revise your script so I will get my version and see if we can get the correct code.
Thanks
CCP 6.0.7
KHXC 6.6.5

I should probably run the last 2 updates. I was a bit anxious to do it since I did so much to the code and I didn't want to lose my custome mods, but I think most of them are in the updates. I know Nick used several of us guys work to improve the cart funtionallity.

Now to learn the install script again. That's something Nick and I worked on for three days to get the Curl to work with a proxy server. The install script for that step needed a function change. At any rate, I'll do the updates and see where I'm at.

Thanks

Last edited by grcauto (01-21-2010 19:07:21)

Offline

 

#4 01-21-2010 19:00:16

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Need code

You are supposed to copy the code from  the code box!! roll

In other words you click inside the first box with a scrollbar (the one with // pricedisplay.php above it) and use your mouse to select the contents of that box, then paste those contents into an empty file before changing the name of that empty file to pricedisplay.php after closing and saving it.

Then you need to follow a similar process for the code in each of the two following boxes ...and, , this will not result in // all.css being appended to your files  - just try not to copy the title of the box (code) whilst copying the contents of those boxes.

Last edited by Design_Wholesale (01-21-2010 19:01:23)

Offline

 

#5 01-21-2010 19:14:09

grcauto
Member
From: Bloomsburg, PA
Registered: 09-11-2006
Posts: 128
Website

Re: Need code

Here's the code of my 'product price display' INCLUDE

Code:

<?php 

$app       = $this->globals('khxc_display.app');
$eol       = $this->globals('khxc.eol');
$priceinfo = $this->globals('ecom.prod_priceinfo');
$proddisp  = $this->globals('ecom.prod_proddisp');

// +--
// | Only display valid prices.
// +--

if (!(empty($priceinfo['type']))) {

     // +--
     // | Display wholesale prices.
     // +--

     if ($priceinfo['type'] == 'W') {

          print '<div class="khxc_pricediv"><p class="inline">Retail: </p>';
          print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybx']);
          print '</p></div>' . $eol . $eol;

          print '<div class="khxc_pricediv"><p class="inline">Wholesale: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']);
          print '</p></div>' . $eol . $eol;

     // +--
     // | Display sale prices.
     // +--

     } elseif ($priceinfo['type'] == 'S') {

          print '<div class="khxc_pricediv"><p class="inline">Regularly: </p>';
          print '<p class="khxc_pricex">' . $this->xhtml_encode($priceinfo['displaybx']);
          print '</p></div>' . $eol . $eol;

          print '<div class="khxc_pricediv"><p class="inline">On Sale: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']);
          print '</p></div>' . $eol . $eol;

     // +--
     // | Display regular prices.
     // +--

     } elseif ($priceinfo['type'] == 'R') {

          print '<div class="khxc_pricediv"><p class="inline">Price: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayb']);
          print '</p></div>' . $eol . $eol;

     } elseif ($priceinfo['type'] == 'V') {

          $priceinfo['displayb'] = preg_replace('/\$/','\$',$priceinfo['displayb']);

          print '<div class="khxc_pricediv">';
          print $priceinfo['displayb'];
          print '</div>' . $eol . $eol;

     } // End of if statement.

     // +--
     // | Display recurring prices.
     // +--

     if ($priceinfo['displayr']) {

          print '<div class="khxc_pricediv"><p class="inline">Recurring Charge: </p>';
          print '<p class="khxc_price">' . $this->xhtml_encode($priceinfo['displayr']);
          print '</p></div>' . $eol . $eol;

     } // End of if statement.

} // End of if statement.

// +--
// | Display out of stock message if this item is out of stock.
// +--

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {

     print '<div class="khxc_pricediv"><p class="khxc_outstock">SOLD</p>';
     print '</div>' . $eol . $eol;

} // End of if statement.

?>

Offline

 

#6 01-22-2010 15:04:55

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Need code

So what exactly are you after then, not forgetting that the only code I have is for the UK version of CCP?

Offline

 

#7 01-22-2010 19:11:12

grcauto
Member
From: Bloomsburg, PA
Registered: 09-11-2006
Posts: 128
Website

Re: Need code

I did several changes to the code and have long forgot exactly what I did. I should have approached it like I would in doing a database system and make thorough documentation of what I did, but I didn't do that.
Basically my wife wanted me to undo a mod I did to the pricing. I was able to do it by adding a new class to the style sheet and changing the function. It's now doing what she wants, but all I did was to do another change that should've been accomplished without adding code.
Thanks for the help.

Offline

 

#8 01-23-2010 23:05:18

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Need code

No problem, and don't worry about the lack of "good housekeeping" - I do all that making backups and taking notes stuff ...and  find things not working or refusing to do as they should!

Last edited by Design_Wholesale (01-23-2010 23:06:27)

Offline

 

Board footer