Find Jobs
Hire Freelancers

Change a Wordpress Ecommerce plugin to store each cart in a DATABASE rather than SESSIONS

$30-100 USD

Cancelado
Publicado há mais de 12 anos

$30-100 USD

Pago na entrega
I'm very busy, and need help on a few tasks. The most important task I need help with is regarding this LGPL licensed Wordpress ecommerce plugin: <[login to view URL]> It uses SESSIONS to store information in the shopping cart. For example, if a person Adds To Cart a shoe, the data for the items that are in the cart is stored using SESSIONS. I need the new code to be 100% backwards compatible, as in, the only thing I want to change is the dependancy on SESSIONS. I want to eliminate this dependance and simply store the cart data in a database entry, and use a COOKIE to store the key to that database entry. Here's the PHP source code that comprises the cart: <[login to view URL]> You can alter this file, or any other wpStoreCart file as much as needed in order to transition to a COOKIE/DATABASE version of the cart, in place of the old SESSIONS method. ## Deliverables Line 62 of [login to view URL] is: $wpsc_cart_type = 'session'; You can change this to something new like: $wpsc_cart_type = 'database'; Then, anywhere you see the cart initialized using sessions, like this: if($wpsc_cart_type == 'session') { if(!isset($_SESSION)) { @session_start(); } if(@!is_object($cart)) { $cart =& $_SESSION['wpsc']; if(@!is_object($cart)) { $cart = new wpsc(); } } } You can add code below it such as: if($wpsc_cart_type == 'database') { // Your code goes here } You can also use $wpsc_cart_type inside the cart itself. Remember, we need the cart to work exactly the way it does already, except we need it to not use SESSIONS at all, and instead, save the state of the cart to the database, and then restore that state on every page load. That's it. That's all this project requires. But the important thing is that everything remains functional after the switch. You may be able to utilize PHP serialize() and unserialize() function, in combination with a COOKIE which will store the primary key of the current users cart database entry. You may need to use the magic methods __sleep() and __wakeup() to properly store the cart. If you're trying out the cart and cannot get it to store items in the cart after you switch to another page, then you're probably effected by this bug: <[login to view URL]> ^ That is the reason why we need to move to a database/cookie solution! wpStoreCart's shopping cart was built from a fork of jCart. These jCart forum threads may help you in this matter: <[login to view URL]> <[login to view URL]> Thanks for looking. If you feel you can do this, please bid! Please, if you're serious about bidding, prove to me you read this by copying and pasting the following into your bid: "I read the entire job description"
ID do Projeto: 3569484

Sobre o projeto

1 proposta
Projeto remoto
Ativo há 13 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
1 freelancers estão ofertando em média $200 USD for esse trabalho
Avatar do Usuário
See private message.
$200 USD em 14 dias
5,0 (8 avaliações)
3,4
3,4

Sobre o cliente

Bandeira do(a)
5,0
8
Membro desde mar. 16, 2011

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.