Webmaster Key - Discussion Forums


Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 09:43:23 PM

Login with username, password and session length
Welceome to Forums!

Important information for guests and new members:

In order to understand the full benefits of becoming an active member of this forum, please review the following information on guest and new member restrictions. These forum changes have been prompted by an overwhelming and unreasonable amount of bot postings and incoherent guest spam messages. We wish to prevent these events from happening in the future and make our community a more comfortable place for all of our members.

For guests:

Guests are not allowed to open new topics, polls, or posts attachments.
If you wish to open up new discussions on this forum, we encourage you to register.

For new members:

New members with less than five posts are not allowed to modify additional profile information such as avatars, contact information, biographies, and signatures. However, new members are encouraged to post their own topics or reply to topics initiated by other members. Become active on the forums and 5 posts should be an easy task!

We are a diverse community with members from all over the world. We encourage new ideas and interesting conversation. Do not be afraid to post webmaster/computer-related questions or problems, as our active members are always willing to help when they are able. Interested? Join us.

+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ Coding Talk
| | | |-+ Online store front and shopping cart script
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print
Author Topic: Online store front and shopping cart script  (Read 3084 times)
stu
Key Keeper
Member
**
Posts: 83



WWW
« on: November 25, 2008, 04:10:49 PM »

Hi

I understand what i am asking is a lot and that peoples time is precious. I have downloaded a shopping cart script. some of it has some errors in which i have fix most. I am new to php and i am really getting stuck now. I have included the zip file which includes all the codes plus i have my so far working version at

http://www.lush-lingerie.com/new

Download coding link

http://www.lush-lingerie.com/new/download.zip

admin area

http://www.lush-lingerie.com/new/admin

username = admin
password   = admin

The problems i have are probably very simple as some of the other problems were just mistakes in the santex. But I just can not find these mistakes.

Problem 1

The pricesn are not being displayed as they should. example is if in the admin page were you add stock i set the price as £0.99 when it comes to the shop is rounded up to £1 and it is in the cart as well. This seems to do the same for all prices including the postage price. that again is set in the admin area.

Problem 2

This is probably the most important. Say i add such and such products to my basket. this is done fine and postage is added on. I now go to complete checkout. the basket total is added up and i enter the details name address extra. I then clcik pay with paypal. (Igoner the message to log into sandbox i have set the paypal file to go to my paypal account). it seems to add an extra few pound on the price. Good for the shop but customers maybe a little upset at this. If i set the postage to zero and the item price to zero when completing checkout the paypal price jumps to £5.

I have shown the uploaded working shop front so you can try this and see in detail what i mean.

Problem 3

In the admin area you can add catagories and products. when you add a product you can then have the option to modify the product. But first you have to select a catagory. If you try to use the drop down list to select a catagory it shows all the catagories but wont let you select one.

I really really want to get this script working correctly and i have spent two days now none stop trying to iron out the kinks. most of which i have done as there were simple like missing table columns in the sql codes given missing semi colons in the php extra. These other problems could very well be somthing like this but i carnt work them out.

The code has been downloaded from

http://www.phpwebcommerce.com/  There is a online guide to this script there.

I do hope someone has the time and kindness to help fix the script with me.

Thankl you in advance

stuart
Report to moderator   Logged

stu
Key Keeper
Member
**
Posts: 83



WWW
« Reply #1 on: November 25, 2008, 05:42:02 PM »

Hi all

I have amended things slightly with the help from aditional downloads i have found and have now fix the bugs all bare 1

The only problem i am having now is the fact that £10.90 will display as £11 £0.78 will display as £1

my sql santex for this is

DROP TABLE IF EXISTS `tbl_product`;
CREATE TABLE `tbl_product` (
  `pd_id` int(10) unsigned NOT NULL auto_increment,
  `cat_id` int(10) unsigned NOT NULL default '0',
  `pd_name` varchar(100) NOT NULL default '',
  `pd_description` text NOT NULL,
  `pd_price` decimal(9,2) NOT NULL default '0.00',
  `pd_qty` smallint(5) unsigned NOT NULL default '0',
  `pd_image` varchar(200) default NULL,
  `pd_thumbnail` varchar(200) default NULL,
  `pd_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `pd_last_update` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`pd_id`),
  KEY `cat_id` (`cat_id`),
  KEY `pd_name` (`pd_name`)
) TYPE=MyISAM AUTO_INCREMENT=22 ;


The php code that displays the price is

<?php
if (!defined('WEB_ROOT')) {
   exit;
}

$product = getProductDetail($pdId, $catId);

// we have $pd_name, $pd_price, $pd_description, $pd_image, $cart_url
extract($product);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
 <tr>
  <td align="center"><img src="<?php echo $pd_image; ?>" border="0" alt="<?php echo $pd_name; ?>"></td>
  <td valign="middle">
<strong><?php echo $pd_name; ?></strong><br>
Price : <?php echo displayAmount($pd_price); ?>
<?php
// if we still have this product in stock
// show the 'Add to cart' button
if ($pd_qty > 0) {
?>
<input type="button" name="btnAddToCart" value="Add To Cart &gt;" onClick="window.location.href='<?php echo $cart_url; ?>';" class="addToCartButton">
<?php
} else {
   echo 'Out Of Stock';
}
?>
  </td>
 </tr>
 <tr align="left">
  <td colspan="2"><?php echo $pd_description; ?></td>
 </tr>
</table>

I'm not sure what i'm doing wrong here

any ideas

thanks

stuart
« Last Edit: November 25, 2008, 06:08:24 PM by stu » Report to moderator   Logged

Manu
Key Keeper
Sr. Member
****
Posts: 437


« Reply #2 on: November 25, 2008, 08:21:34 PM »

mmmmmmm......... where are the models?
Report to moderator   Logged
Pages: [1] Go Up Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print 
+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ Coding Talk
| | | |-+ Online store front and shopping cart script

Jump to:  
« previous next »


Our Partners
RelmaxTOP Ranking System Web Hosting RelmaxTOP Ranking System
Staff Sites
12Noon[12Noon Gallery] Andy[Urgentclick]
Tamuril[Tamuril's Digital Art Exhibit] Sensovision
Powered by MySQL Powered by PHP We are hosted by Relmax Inc. |Our Privacy Policy | Sitemap
Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Forum design by Tamuril © 2005.
Valid XHTML 1.0! Valid CSS!