{"id":19163687,"url":"https://github.com/stnc/shopping-cart","last_synced_at":"2026-03-08T16:06:59.737Z","repository":{"id":28862026,"uuid":"32386159","full_name":"stnc/shopping-cart","owner":"stnc","description":"Php  Shopping Cart Class (easy and flexible)","archived":false,"fork":false,"pushed_at":"2020-08-27T21:36:46.000Z","size":2166,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T21:26:08.356Z","etag":null,"topics":["php","php-shopping-cart","shopping-cart"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stnc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-17T10:13:52.000Z","updated_at":"2024-07-29T21:01:12.000Z","dependencies_parsed_at":"2022-09-05T08:51:12.074Z","dependency_job_id":null,"html_url":"https://github.com/stnc/shopping-cart","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fshopping-cart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fshopping-cart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fshopping-cart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stnc%2Fshopping-cart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stnc","download_url":"https://codeload.github.com/stnc/shopping-cart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252866267,"owners_count":21816433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","php-shopping-cart","shopping-cart"],"created_at":"2024-11-09T09:16:20.686Z","updated_at":"2026-03-08T16:06:59.695Z","avatar_url":"https://github.com/stnc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# PHP SHOPPING CART\n\nphp simple shopping cart class and html ajax  example \n\n#  Install  \n```php\ncomposer require stnc/shopping-cart\n```\n\u003chr\u003e\n\n\u003cstrong\u003e SCREENSHOT \u003c/strong\u003e\n\n\u003cimg  src=\"https://raw.githubusercontent.com/stnc/shopping-cart/master/screen2.png\"\u003e\n\n\u003cimg  src=\"https://raw.githubusercontent.com/stnc/shopping-cart/master/screen.png\"\u003e\n\n\n\u003chr\u003e\n\n\n\n\n## init\n```php\n\n       \n        // use use \\Stnc\\ShoppingCart\\Cart;\n$cart_name = 'stnc'; // sepetin session değerine bir değer atadık\n$cart = new Cart($cart_name);\n$cart-\u003egroups=false;\n```\n## ADDTOCART function\n\nadd to cart\n\n```php\n$data = array(\n\t\t'productID' =\u003e 100,\n\t\t'productName' =\u003e \"ice cream\",\n\t\t'productImageURL' =\u003e \"https://example.org/icecream.jpg\",\n\t\t'URL' =\u003e \"https://example.org/product/100\",\n\t\t'price' =\u003e 40.99,\n\t\t\"totalEach\" =\u003e 1,\n\t\t'stockUnit'=\u003e'unit',\n\t\t\"totalPrice\" =\u003e 40.99\n);\n$cart-\u003eaddToCart(\"100\", $data);\n\t  echo '\u003cpre\u003e';\n\t  print_r($cart-\u003egetArray());\n\t  echo '\u003c/pre\u003e';\n```\n## removeCart function \n\ncart to remove \n\n\n```php\n   $cart-\u003eremoveCart(100);\n\t  echo '\u003cpre\u003e';\n\t  print_r($cart-\u003egetArray());\n\t  echo '\u003c/pre\u003e';\n```\n\n## getJson function \n\ncart json info \n\n\n```php\n   $cart-\u003egetJson();\n```\n\n\n## viewCart function\n\n\n## emptyCart function\n\ncart empty\n```php\n   $cart-\u003eemptyCart();\n \t  echo '\u003cpre\u003e';\n\t  print_r($cart-\u003egetArray());\n\t  echo '\u003c/pre\u003e';\n```\n\n## getArray function\n\ncart to result array \n```php\n\t  echo '\u003cpre\u003e';\n\t  print_r($cart-\u003egetArray());\n\t  echo '\u003c/pre\u003e';\n```\n\n\t// \n\t print_r( $cart-\u003ecartCount());\n\n## cartCount fonksiyonu\n\ngives information about the total of items in the basket\n\n```php\n\t  print_r($cart-\u003ecartCount());\n```\n\n## cartInfo fonksiyonu\n\nCart information \n```php\n\t  print_r($cart-\u003ecartInfo());\n```\n\n\n\n```\ndemo page thx \nhttps://startbootstrap.com/templates/heroic-features/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstnc%2Fshopping-cart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstnc%2Fshopping-cart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstnc%2Fshopping-cart/lists"}