Jump to content

 

osama moqbal

Member Since 10 Jun 2018
Offline Last Active Jan 21 2019 07:49 AM
-----

Topics I've Started

Cs-Cart File To Sub-Folder In Host

17 January 2019 - 07:07 AM

now I moved my cs-cart file from root to sub-folder and I edit the htaccess file . and everything is ok and website works well.

 

now I have htaccess in subfolder and  htaccess in root contan [code to make primary domain read from subfloder

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^alphastore-kw.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.alphastore-kw.com$
RewriteCond %{REQUEST_URI} !alphastore-kw.com/
RewriteRule (.*) /alphastore-kw.com/$1 [L]

 

]. but I read cs-cart guidelines to make this {

 



  1. If the SEO add-on is enabled, open the .htaccess file located in the root directory of your store.



  2. Find the following line of code there:


    # RewriteBase /subdirectory
     
    }
    can anyone please guide me how I can do that. because i tried to change htaccess subfolder to this 
    # RewriteBase /subfoldername


 

does it will affect in our SEO and google indexing


Include Php Code The Retrieve Date From Sql Into Cs-Cart Page

09 December 2018 - 06:25 AM

can you please help me how to include PHP code into the cs-cart page to make tracking system to customer from our service center database.does my code is not secure to the database.

here is my PHP code   

{

<html>
<meta name="viewport" content="width=device-width">
<style>
#customers {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}
 
#customers td, #customers th {
  border: 1px solid #ddd;
  padding: 8px;
}
 
#customers tr:nth-child(even){background-color: #f2f2f2;}
 
#customers tr:hover {background-color: #ddd;}
 
#customers th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4CAF50;
  color: white;
}
input[type=submit] {
  width: 20%;
  background-color: #4CAF50;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  margin-left:10px;
  border-radius: 4px;
  cursor: pointer;
}
input[type=text] {
  width: 20%;
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
 
</style>
<body>
<form method="post" action="file.php">
      please enter user_id:<input type="text" name="id" value="<?php echo $id;?>">
     <input type="submit" name="submit" value="submit">
     </form>
<table id="customers">
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<?php
$id =$_POST["id"];
if (isset($_POST['submit'])){
 
$conn = mysqli_connect($localhost, "dbusername", "password", "dbname");
$id = $_POST["id"];
 
$sql = "SELECT `firstname` , `lastname` FROM `cscart_users` WHERE user_id = $id";
 
$result= mysqli_query($conn , $sql);
if ($result->num_rows > 0)  {
while ($row= mysqli_fetch_array($result)){
     
echo  "</td><td>". $row["firstname"] ."</td><td>". $row["lastname"] ."</td></tr>";
 
    }
    echo "</table>";
    }
    else {
     echo "<p><b>please ensure that invoice id or mobile number is correct </b></p>";
     
     }
 mysqli_close($conn); 
}
 
?>
</body> 
</html>    
   }

How To Include Sql Query Using Php In Cs-Cart Page And Display In Data In A Table

07 December 2018 - 07:40 PM

I create new PHP page to retrieve data from a database, but I want to include the PHP query code in the cs-cart page.  and does my code not secure for a hacker to the database.

 

here is my code {

<html>
<meta name="viewport" content="width=device-width">
<style>
#customers {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}
 
#customers td, #customers th {
  border: 1px solid #ddd;
  padding: 8px;
}
 
#customers tr:nth-child(even){background-color: #f2f2f2;}
 
#customers tr:hover {background-color: #ddd;}
 
#customers th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4CAF50;
  color: white;
}
input[type=submit] {
  width: 250px;
  background-color: #4CAF50;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  border-radius: 4px;
   margin-left: 20px;
  cursor: pointer;
}
input[type=text] {
  width: 200px%;
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
</style>
<body>
<table id="customers">
<tr>
<th>firstname</th>
<th>lastname</th>
</tr>
<?php
 
if ($_SERVER["REQUEST_METHOD"] == "POST"){
 
$id =$_POST["id"];
$conn = new mysqli($localhost, "username", "pass", "sdb_name");
$id = $_POST["id"];
 
$sql = "SELECT `firstname` , `lastname` FROM `cscart_users` WHERE user_id = $id";
 
$result= mysqli_query($conn , $sql);
if ($result->num_rows > 0)  {
while ($row= mysqli_fetch_array($result)){
 
echo  "</td><td>". $row["firstname"] ."</td><td>". $row["lastname"] ."</td></tr>";
    }
}
}
 
?>
 
     <form method="post" action="file.php">
      please enter user_id:<input type="text" name="id">
     <input type="submit" name="submit" value="submit">
     </form>
   
 
</table>
 
}

Product Tap Problem

01 December 2018 - 10:02 AM

why the product tap appear again in the product block ( similar product and already viewed product ) 

 

please see the photo attached to fully understand me. 

 

 


Jquery 3D Carousel Script Not Working

26 November 2018 - 07:25 AM

I need to make the 3d carousel, so I searched and found a script on the internet. it works goods on any offline browser, but it did not work on the website. I used HTML with smarty to make it but only CSS and HTML work but the jquery did not work, even when I upload the HTML page to my server and open it work perfectly. 

 ** the script { 

  <script>
    $(function() {
      var showcase = $("#showcase"), title = $('#item-title')
 
      showcase.Cloud9Carousel( {
        yOrigin: 42,
        yRadius: 48,
        mirror: {
          gap: 12,
          height: 0.2
        },
        buttonLeft: $("#nav > .left"),
        buttonRight: $("#nav > .right"),
        autoPlay: 1,
        bringToFront: true,
        onRendered: rendered,
        onLoaded: function() {
          showcase.css( 'visibility', 'visible' )
          showcase.css( 'display', 'none' )
          showcase.fadeIn( 1500 )
        }
      } )
 
      function rendered( carousel ) {
        title.text( carousel.nearestItem().element.alt )
 
        // Fade in based on proximity of the item
        var c = Math.cos((carousel.floatIndex() % 1) * 2 * Math.PI)
        title.css('opacity', 0.5 + (0.5 * c))
      }
 
      //
      // Simulate physical button click effect
      //
      $('#nav > button').click( function( e ) {
        var b = $(e.target).addClass( 'down' )
        setTimeout( function() { b.removeClass( 'down' ) }, 80 )
      } )
 
      $(document).keydown( function( e ) {
        //
        // More codes: http://www.javascrip...aq/keycodes.htm
        //
        switch( e.keyCode ) {
          /* left arrow */
          case 37:
            $('#nav > .left').click()
            break
 
          /* right arrow */
          case 39:
            $('#nav > .right').click()
        }
      } )
    })
  </script>
  <style>
    a {
      color: #da2020;
    }
    a:hover {
      color: #d6f300;
    }
    .wrap > h1 {
      margin: 26px auto;
    }
    #showcase {
      height: 460px;
      background: #16235e;
      background: -moz-linear-gradient(top, #16235e 0%, #020223 100%); /* FF3.6+ */
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#16235e), color-stop(100%,#020223)); /* Chrome, Safari4+ */
      background: -webkit-linear-gradient(top, #16235e 0%, #020223 100%); /* Chrome10+, Safari5.1+ */
      background: -o-linear-gradient(top, #16235e 0%, #020223 100%); /* Opera 11.10+ */
      background: -ms-linear-gradient(top, #16235e 0%, #020223 100%); /* IE10+ */
      background: linear-gradient(to bottom, #16235e 0%, #020223 100%); /* W3C */
      -webkit-box-shadow: 0px 0px 13px 5px #DB1242;
      -moz-box-shadow: 0px 0px 13px 5px #DB1242;
      box-shadow: 0px 0px 13px 5px #DB1242;
      -webkit-border-radius: 8px;
      -moz-border-radius: 8px;
      border-radius: 8px;
    }
    #item-title {
      color: #F31414;
      font-size: 29px;
      letter-spacing: 0.13em;
      text-shadow: 1px 1px 6px #C72B2B;
      text-align: center;
      margin-top: 30px;
      margin-bottom: 22px;
    }
    #nav {
      text-align: center;
    }
    #nav > button {
      width: 64px;
      height: 36px;
      color: #666;
      font: bold 16px arial;
      text-align: center;
      margin: 5px;
      text-shadow: 0px 1px 0px #f5f5f5;
      background: #f6f6f6;
      border: solid 2px rgba(0, 0, 0, 0.4);
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
      -webkit-box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.4);
      -moz-box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.4);
      box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.4);
      cursor: pointer;
    }
    #nav > button:active,
    #nav > button.down {
      background: #dfdfdf;
      border: solid 2px rgba(0, 0, 0, 0.6);
      box-shadow: none;
    }
    #share {
      top: -9px;
    }
    #credits {
      top: -15px;
    }
  </style>
 
  <div class="wrap">
    <div id="showcase" class="noselect">
      <img class="cloud9-item" src="http://specious.gith...rs/firefox.png"alt="Firefox">
      <img class="cloud9-item" src="http://specious.gith...wsers/wyzo.png"alt="Wyzo">
      <img class="cloud9-item" src="http://specious.gith...sers/opera.png"alt="Opera">
      <img class="cloud9-item" src="http://specious.gith...ers/chrome.png"alt="Chrome">
      <img class="cloud9-item" src="http://specious.gith...s/iexplore.png"alt="Internet Explorer">
      <img class="cloud9-item" src="http://specious.gith...ers/safari.png"alt="Safari">
    </div>
    <footer>
      <p id="item-title">&nbsp;</p>
      <div id="nav" class="noselect">
        <button class="left">
          ←
        </button>
        <button class="right">
          →
        </button>
      </div>
  </div>
}
 
** I think cs-cart can not read the library. 
 
** kindly see attached to understand me. 
its the example of how it works https://test.alphast...kw.com/div.html