Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

jose dos reis alves

Loja vitual com um unico produto.

Recommended Posts

Boa noite, estou com um projeto de vendas mas estou com um pequeno problema na finalização, estou criando um site para vender um unico produto. seguinte vou esplicar meio rapido

Trabalho com semem bolvino, estou com um projeto da seguinte forma o cliente entra no site e faz a compra do semem , com isso ele ganha o direito de 3 indicaçoes assim que ele conseguir indicar esse produto para mais 3 amigos, ele ganha mais um semem da empresa de brinde, com isso ele tem direito de ir a empresa e fazer a enseminaçao ou nos compramos os 2 dele por 900 reais, 

vamos ao meu poblema, a parte de venda , estou precisando de uma pagina em php onde o cliente cadastra e automaticamente apos o cadastro e enviado pra ele a conta para pagamento, ( vou trabalhar somente com transferencia ou boleto)  mas preciso de um painel para ver quem cadastrou, e ter esse controle outra coisa nesse formulario preciso que o cliente tambem possa preencher com o nome de quem o indicou para ter esse controle. 

 obrigado espero que alguem possa me ajudar.

estou postando o link do blog mas tenho tambem o dominio registrado 
http://novageneticaweb.blogspot.com.br/

Compartilhar este post


Link para o post
Compartilhar em outros sites

Então... se você nunca teve contato com linguagem de programação, eu recomendo que contrate alguém pra fazer isso pra você, ainda mais pra coisas que envolvem dinheiro, precisa ser bem feito e seguro, ninguém gosta de perde dinheiro né? ahahaha

Caso você tenha conhecimento na área, seja mais específico na sua dúvida pra gente conseguir te ajudar!

Compartilhar este post


Link para o post
Compartilhar em outros sites

  • Conteúdo Similar

    • Por Carlos Antoliv
      Senhores, tudo bem?
       
      Tô numa dúvida aqui... tá matando.
      Estou tentando contar a quantidade de itens do carrinho de compras.
       
      Este aqui é o input que aparece a quantidade de itens:
      <td><input type="text" name="prod[<?php echo $result['id']?>]" value="<?php echo $qtdProd = $result['quantity']?>" size="1"  />                          </td>  
      Aparece normalmente a quantidade de itens. Ex: arroz   2  <<< este 2 fica dentro do input, onde posso alterá-lo.
      Minha ideia é mostrar na tela a quantidade total de itens que estão no carrinho.
       
      To usando esse código aqui pra aparecer o número total.... e até funciona:
       
                         <?php                                     if(isset($_SESSION['carrinho'])){                                     $amount = 0;                                     $count = 0;                                     $size = count($_SESSION['carrinho']);                                                                         foreach($_SESSION['carrinho'] as $data){                                     $count++;                                     $amount += $data['quantity'];                                     if($size == $count){                                     echo "TOTAL = $amount";                                     }                                 }                             }                                 ?>  
      O problema é que está exibindo o seguinte erro:
      Warning: Illegal string offset 'quantity' in C:\...\www\sistema\carrinho-de-compra\carrinho.php on line 90
       
      Erro na linha 90, no caso, neste linha aqui: 
          $amount += $data['quantity'];
       
      Daí travei um pouco.
       
      Alguém que poderia dar força ? Tá osso aqui.
      tmj
       
       
    • Por tony_lu
      Ola pessoal, preciso de uma ajuda!
      Tenho uma loja virtual na brasil na web onde esta integrado uma conta do pagseguro. Acontece que a mesma empresa quer uma outra loja, porém na plataforma Tray e com pagamento via Pagseguro! Então estou na duvida, posso integrar a mesma conta pagseguro com o mesmo token para as duas lojas? Não pode dar conflito?
      A plataforma Brasil na Web eu coloco para configurar o token e o email de cadastro do Pagseguro, na loja Tray tem que colocar além do token, cadastrar uma url la dentro do pagseguro, acho que é uma url de retorno. Então meu receio é dar conflito! Qual seria a melhor solução? Aguardo obrigado
    • Por Hamanom007
      Loja Virtual criada em 2008, nosso querido PHP atualizou e fico descontinuada, a loja não funcionava, mas com muito esforço consegui, e agora volto a ter sua função de comprar e de alertar o responsável que fizeram um novo pedido.

      Sendo assim sua funcionalidade básica volto ao normal.

      Porem á erro que não estou conseguindo resolver.
      Os meus estudos sobre a falha aponta para: 
      Atualize o ISC e magic_quotes_runtime_on 
      Mas como disse, são só conteúdos que tenho lido, porem não sei se estou no caminho correto.

      O erro aparecendo é esse:
       
      Strict Standards: Declaration of ISC_FORMFIELD_CHECKBOXSELECT::getFieldRequestValue() should be compatible with ISC_FORMFIELD_BASE::getFieldRequestValue($fieldName = '') in /home2/jajajavai/public_html/loja/lib/formfields/formfield.checkboxselect.php on line 295 Configuração do PHP INI:


       Quem poder me apontar uma direção fico muito agradecido Obrigado a todos.


      Aqui está o arquivo do alerta:

       
      <?php error_reporting(0); class ISC_FORMFIELD_CHECKBOXSELECT extends ISC_FORMFIELD_BASE { /** * Constructor * * Base constructor * * @access public * @param mixed $fieldId The optional form field Id/array * @param bool $copyField If TRUE then this field will copy the field $fieldId EXCEPT for the field ID. Default is FALSE * @return void */ public function __construct($formId, $fieldId='', $copyField=false) { $defaultExtraInfo = array( 'class' => '', 'style' => '', 'options' => array() ); parent::__construct($formId, $defaultExtraInfo, $fieldId, $copyField); } /** * Get the form field description * * Static method will return an array with the form field name and description as the elements * * @access public * @return array The description array */ public static function getDetails() { return array( 'name' => GetLang('FormFieldSingleCheckBoxName'), 'desc' => GetLang('FormFieldSingleCheckBoxDesc'), 'img' => 'checkbox.png', ); } /** * Get the requested (POST or GET) value of a field * * Method will search through all the POST and GET array values are return the field * value if found. Method will the POST and GET arrays in order based on the PHP INI * value 'variables_order' (the GPC order) * * @access public * @return mixed The value of the form field, if found. Empty string if not found */ public function getFieldRequestValue() { $options = parent::getFieldRequestValue(); if (!is_array($options)) { $options = array($options); } $options = array_filter($options); $options = array_values($options); return $options; } /** * Run validation on the server side * * Method will run the validation on the server side (will not run the JS function type) and return * the result * * @access public * @param string &$errmsg The error message if the validation fails * @return bool TRUE if the validation was successful, FALSE if it failed */ public function runValidation(&$errmsg) { if (!parent::runValidation($errmsg)) { return false; } $values = $this->getValue(); if ($values == '') { return true; } /** * Just need to check that all our selected values actually existing within our options array */ if (empty($this->extraInfo['options'])) { return true; } foreach ($values as $value) { if (!in_array($value, $this->extraInfo['options'])) { $errmsg = sprintf(GetLang('CustomFieldsValidationInvalidSelectOption'), $this->label); return false; } } return true; } /** * Set the field value * * Method will set the field value, overriding the existing one * * @access public * @param mixed $value The default value to set * @param bool $setFromDB TRUE to specify that this value is from the DB, FALSE from the request. * Default is FALSE * @param bool $assignRealValue TRUE to filter out any values that is not in the options array, * FALSE to set as is. Default is TRUE */ public function setValue($value, $setFromDB=false, $assignRealValue=true) { if (!is_array($value)) { $value = array($value); $value = array_filter($value); } if ($assignRealValue && !empty($this->extraInfo['options'])) { $filtered = array(); foreach ($value as $key => $val) { $index = array_isearch($val, $this->extraInfo['options']); if ($index !== false) { $filtered[$key] = $this->extraInfo['options'][$index]; } } $value = $filtered; } parent::setValue($value, $setFromDB); } /** * Set the field value by the indexes in the options array * * Method will set the value based upon the indexes in the options array. Every values in the * array $indexes will correspond to the index in the options array * * @access public * @param array $indexes The array of indexes * @return NULL */ public function setValueByIndex($indexes) { if (!is_array($indexes)) { $indexes = array($indexes); } $indexes = array_filter($indexes, 'is_numeric'); if (empty($indexes) || empty($this->extraInfo['options'])) { return; } $newValue = array(); foreach ($indexes as $index) { if (array_key_exists($index, $this->extraInfo['options'])) { $newValue[] = $this->extraInfo['options'][$index]; } } $this->setValue($newValue); } /** * Set the select options * * Method will set the select option for the frontend select box, overriding any perviously set options * * @access public * @param array $options The options array with the key as the options value and the value as the options text * @return bool TRUE if the options were set, FALSE if options were not an array */ public function setOptions($options) { if (!is_array($options)) { return false; } else { $options = array_values($options); } $this->extraInfo['options'] = $options; } /** * Build the frontend HTML for the form field * * Method will build and return the frontend HTML of the loaded form field. The form field must be * loaded before hand * * @access public * @return string The frontend form field HTML if the form field was loaded beforehand, FALSE if not */ public function loadForFrontend() { if (!$this->isLoaded()) { return false; } /** * Make sure that our value is an array */ $this->setValue($this->value); /** * Do we have options (hope so)? */ $GLOBALS['FormFieldCheckBoxes'] = ''; if (!empty($this->extraInfo['options'])) { $id = $this->getFieldId(); $name = $this->getFieldName(); $args = ''; if ($this->extraInfo['class'] !== '') { $args .= 'class="' . isc_html_escape($this->extraInfo['class']) . ' FormFieldOption" '; } else { $args .= 'class="FormFieldOption" '; } if ($this->extraInfo['style'] !== '') { $args .= 'style="' . isc_html_escape($this->extraInfo['style']) . '" '; } $checkboxes = array(); $options = array_values($this->extraInfo['options']); foreach ($this->extraInfo['options'] as $key => $val) { $newId = $id . '_' . $key; $newName = $name . '[' . $key . ']'; $html = '<label for="' . $newId . '">'; $html .= '<input type="checkbox" id="' . $newId . '" name="' . $newName . '" value="' . isc_html_escape($val) . '" ' . $args; /** * Is this one of our values? */ if (in_array($val, $this->value)) { $html .= ' checked="checked"'; } $html .= ' /> ' . isc_html_escape($val) . '</label>'; $checkboxes[] = $html; $key++; } $GLOBALS['FormFieldCheckBoxes'] = implode('<br />', $checkboxes); } $GLOBALS['FormFieldDefaultArgs'] = 'id="' . isc_html_escape($this->getFieldId()) . '" class="FormField"'; return $this->buildForFrontend(); } /** * Build the backend HTML for the form field * * Method will build and return the backend HTML of the form field * * @access public * @return string The backend form field HTML */ public function loadForBackend() { $GLOBALS['FormFieldClass'] = isc_html_escape($this->extraInfo['class']); $GLOBALS['FormFieldStyle'] = isc_html_escape($this->extraInfo['style']); $GLOBALS['FormFieldOptions'] = implode("\n", $this->extraInfo['options']); return parent::buildForBackend(); } /** * Save the field record * * Method will save the field record into the database * * @access protected * @param array $data The field data record set * @param string &$error The referenced variable to store the error in * @return bool TRUE if the field was saved successfully, FALSE if not */ public function saveForBackend($data, &$error) { return parent::saveForBackend($data, $error); } }  
    • Por brunoatratrus
      Bom dia!
      Sou iniciante em JavaScript e estou quebrando a cabeça pra resolver um problema, vê se vocês podem me ajudar.
      O projeto consiste em um sistema de vendas online bem simples, por isso não utilizei nenhuma plataforma.
       
      O código abaixo é o script que adiciona produtos no carrinho sem dar refresh:
      $(document).ready(function(){ $("#addcarrinhoajax").click(function(){ var envio = $.get("add_carrinho.php", { idproduto: $("#idproduto").val(), }) envio.done(function(data) { // AQUI É QUE ESTÁ O PROBLEMA }) envio.fail(function() { alert("Erro na requisição"); }) }); }); Esse é o código add_carrinho.php:
      <?php session_start(); require_once 'admin/conexao.php'; $idproduto = $_GET['idproduto']; if(!isset($_SESSION['itens'][$idproduto])) { $_SESSION['itens'][$idproduto] = 1; }else{ $_SESSION['itens'][$idproduto] += 1; } ?> Aqui vem uma parte do código onde lista os produtos, a parte onde tem o form com o botão para adicionar produto:
      <form action="" method="GET"> <input type="hidden" id="idproduto" name="idproduto" value="<?php echo $item['id']; ?>"> <img src="img/carrinho.png"> <button type="button" id="addcarrinhoajax"> Add</button> </form> Código do carrinho, onde só aparece o preço total. O carrinho fica numa DIV fixa na lateral.
      <div class="preco"> <?php if(count($_SESSION['itens']) == 0) { echo "Carrinho Vazio"; }else { echo 'R$ ' . number_format($somaCarrinho, 2, ',', '.'); } ?> </div> A questão é a seguinte: Toda vez que clico no botão para adicionar, ele adiciona mas não muda o valor! Preciso atualizar a página pra vê o valor total no carrinho.
      Como faço pra quando apertar o botão de add, atualizar junto o preço do carrinho dinamicamente?
    • Por juliosonic
      Boa tarde a todos..



      Preciso criar uma loja virtual, e gostaria de saber se na opinião de vocês compensa desenvolver uma do zero, ou se é mais rápido e pratico comprar uma pronta?



      Já trabalho algum tempo com Desenvolvimento Web, mas nunca tive que fazer uma loja virtual, por isso a dúvida. E pesquisando um pouco, vi que muitos vendem tudo pronto já por um valor extremamente simbólico, como esse aqui do ML



      https://produto.mercadolivre.com.br/MLB-1136718108-script-loja-virtual-v12-atualizada-20-temas-expansiva-_JM
       
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.