Jump to content

Adding input dropbox in SHOPPING CART


ShoppingCart

Recommended Posts

Hello Freaks

If you cannot help me I realy don't know who can.
I want to use [b]Shop-Script Free[/b] for my lousy web shop.
I want to add just one [b]input with a dropbox [/b] in the products info and whan the value is choosed I want to see it in the order on the admin side.
Sounds impossible  ??? for a [b]PHP nOOb [/b] like me but I know that it can be done.
Is there someone who can help me with the [b]coding[/b]?

I will be one very greatfull grapefruit (Bjork)

I love you all freakies!

Link to comment
https://forums.phpfreaks.com/topic/25873-adding-input-dropbox-in-shopping-cart/
Share on other sites

I don't know [b]anything[/b] about the script of which you speak.  Where'd you get the script?

GENERALLY here's how I create a drop down list.  I prefer to have the select items in an array.
[code]
<?php
//first let's setup an array of items
$arrList = array();
for($i;$i=0;$i++){
  $arrList[$i]="Item" . $i;
}

//the following will make the "arrList" available when the page is reloaded.
$_SESSION['arrList'] = $arrList;
//Now that there's an array, I'm going to use it to build a select list (that's what a drop down box/list is called).
echo '<select name="testList">
';
foreach($arrList as $key=>$value){
  echo '    <option value=". $key . '>' . $value '</option>
';
}
echo '</select>';
?>
[/code]

That will create the select list.  The following will find out what was selected.
[code]
$arrList = $_SESSION['arrList'];
$itm = $arrList[$_POST['testList']];
[/code]
I just found the following in the FAQ pages at the site link you provided.  It indicates that this uses Smarty.  I've never used Smarty, but I'm sure that the code I posted won't work with Smarty.

There is a link in the FAQ to a Guide to redesigning the store.  I've got to imagine that "redesign" would include adding a select list.

This is a link directly to the FAQ item:  [url=http://www.shop-script.com/php-shopping-cart-software-1-faqs.html]http://www.shop-script.com/php-shopping-cart-software-1-faqs.html[/url].

[b]How do I change the design of my Shop-Script based online store? Is it difficult?[/b]

    Easy design integration is one of Shop-Script software core benefits.

    All Shop-Script packages are designed to work with the use of Smarty template engine which is a very powerful and popular technology. It allows to change look & feel of your shopping cart as you like without any limitations. Shop-Script can be easily integrated into your custom design.

    Design is fully separated from PHP script files and is defined in HTML files located in a separate subfolder of Shop-Script package (templates). Templates can be edited in any text and/or WYSIWYG editor, e.g. Macromedia DreamWeaver, Microsoft FrontPage, Adobe GoLive.

    If you are not a user of Shop-Script FREE we encourage you to download Shop-Script FREE and see how redesign procedure is handled. Hints on redesigning can be found in Shop-Script FREE User Guide (PDF).
Thanx for help m8.

I've dropped Shop.Script. Too complicated.

Everybody who will come here to read those posts and everybody who is a nOOb in PHP and shopping carts .. try Quick.Cart from http://opensolution.org/
It is an open source one.

If I can menage it .. everybody can.

Have a nice PHPing

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.