Jump to content

ClicShopping

Administrators
  • Posts

    399
  • Joined

  • Last visited

  • Days Won

    107

Everything posted by ClicShopping

  1. Hooks ClicShopping\OM\Hooks Introduction Hooks allow action callouts to be thrown during an event to execute additional functionality. Hooks are not modules in the traditional sense of being able to be installed and configured; they are simply modular functions waiting to be executed on demand with no configuration or administration whatsoever. For security reasons, hooks must be defined in their Apps metadata file otherwise they will not be made available for the framework to use. Hooks are initialized by creating an instance of ClicShopping\OM\Hooks and specifying the Site to call the hook action from. If no Site is passed, the Site that initialized the framework is used as default. use ClicShopping\OM\Hooks; $CLICSHOPPING_Hooks = new Hooks(); Hooks() is automatically initialized on each page request and is available in the Registry as Hooks. Action Callout Throwing out an action callout is performed by specifying the group the action belongs to, the actual action name, and optionally a specific function to execute. There are two types of callouts that can be peformed: Type Description call() Executes the hooks and can return an array of results depending on the action. output() Executes the hooks and returns the output as a string. Hooks::call() // no output expected $CLICSHOPPING_Hooks->call('Account', 'Logout'); Parameters Hooks::call($group, $hook, $parameters, $action) Parameter Value $group The group the action call belongs to. $hook The name of the action to call. $parameters Any parameters to pass to the hooks. $action The name of the hook function to execute. Default: execute Hooks::output() // concatenated string output of all hooks executed echo $CLICSHOPPING_Hooks->output('Orders', 'Page', null, 'display') Parameters Hooks::output($group, $hook, $parameters, $action) The output() method shares the same function parameters as the call() class method. A list of hook action callouts is available on the List of Hook Callouts page. Runtime Watches Runtime watches can be defined that execute when the hook is called. This differs from hooks defined in App metadata files as they are defined in-line and execute either an existing function or are defined with an anonymous function to execute: use ClicShopping\OM\Registry; $CLICSHOPPING_Hooks = Registry::get('Hooks'); $CLICSHOPPING_Hooks->watch('Session', 'Recreated', 'execute', function($parameters) { .... });
  2. Registry ClicShopping\OM\Registry Introduction The registry is an object storage container strictly used to store object instances and access them by reference. It does not allow registered objects to be overwritten unless manually specified to do so. Adding to the Registry Objects can be added to the registry using Registry::set(). use ClicShopping\OM\Db; use ClicShopping\OM\Registry; $CLICSHOPPING_Db = Db::initialize(); Registry::set('Db', $CLICSHOPPING_Db); Parameters Registry::set($key, $value, $force) Parameter Value $key The name of the object to reference in the registry. $value The object to store in the registry. $force If this is enabled, overwrite an existing object with a new value. Default: false Accessing the Registry An object can be accessed in the registry using Registry::get(). use ClicShopping\OM\Registry; $CLICSHOPPING_Db = Registry::get('Db'); Parameters Registry::get($key) Parameter Value $key The name of the object to access in the registry. Checking the Registry An existing object can be checked for in the registry using Registry::exists(). use ClicShopping\OM\Db; use ClicShopping\OM\Registry; if (Registry::exists('Db')) { $CLICSHOPPING_Db = Registry::get('Db'); } else { $CLICSHOPPING_Db = Db::initialize(); Registry::set('Db', $CLICSHOPPING_Db); } Parameters Registry::exists($key) Parameter Value $key The name of the object to check in the registry for.
  3. Database ClicShopping\OM\Db Introduction The Db class manages the connection to the database server and executes sql queries. It extends the native PHP PDO class with custom functionality optimized to the framework. The class executes sql queries safely and securely by binding parameter values to the query via placeholders rather then having the values being injected into the sql query itself. Connections Db::initialize() opens a new connection to the database server. All parameters of the function are optional where the installation configuration values are used as default values. use ClicShopping\OM\Db; $CLICSHOPPING_Db = Db::initialize(); Parameters Db::initialize($server, $username, $password, $database, $port, array $driver_options) Parameter Value $server The address of the database server. Default: db_server $username The username to connect to the database server with. Default: db_server_username $password The password of the user account. Default: db_server_password $database The name of the database. Default: db_database $port The port number of the database server. Default: null $driver_options Additional driver options to use for the database connection. Defaults: PDO::ATTR_ERRMODE PDO::ERRMODE_WARNING PDO::ATTR_DEFAULT_FETCH_MODE PDO::FETCH_ASSOC PDO::ATTR_STATEMENT_CLASS ClicShopping\OM\DbStatement PDO::MYSQL_ATTR_INIT_COMMAND set session sql_mode="STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" A database connection is created on each page request and is available in the Registry as Db. Queries Prepared Statements Queries are performed with Db::prepare() which securely binds values to the query using placeholders. $seach = 'chocolate'; $category_id = 1; $price = '4.99'; $Qproducts = $CLICSHOPPING_Db->prepare('select title from :table_products where description like :description and category_id = :category_id and status = :status and price < :price order by title'); $Qproducts->bindValue(':description', '%' . $chocolate . '%'); $Qproducts->bindInt(':category_id', $category_id); $Qproducts->bindBool(':status', true); $Qproducts->bindDecimal(':price', $price); $Qproducts->execute(); while ($Qproducts->fetch()) { echo $Qproducts->value('title'); } Binding Parameters Parameters can be binded to the query using the following functions: Value Type Function String bindValue Integer bindInt Boolean bindBool Decimal bindDecimal Null bindNull [code] Table names prefixed with [b]:table_[/b] are binded and prefixed automatically with db_table_prefix. [b]Single Function Calls[/b] [b]Select Queries[/b] Simple select queries that do not need parameters to be binded can be executed with Db::query(). This functions returns a normal result set. [code] $Qstates = $CLICSHOPPING_Db->query('select id, title from :table_states where country_id = 1 order by title'); while ($Qstates->fetch()) { echo $Qstates->value('title'); } Update/Delete Queries Simple update/delete queries that do not need parameters to be binded can be executed with Db::exec(). This functions returns the number of rows affected. $result = $CLICSHOPPING_Db->exec('delete from :table_states where country_id = 1'); echo 'Affected rows: ' . $result; [code] [b]Results[/b] Results can be returned as a single result set, a multiple result set, and as an array containing all rows or columns. Fetching [b]Single Result Set[/b] Returning a single result set is performed as: [code] $Qstate = $CLICSHOPPING_Db->prepare('select title from :table_states where id = :id'); $Qstate->bindInt(':id', 1); $Qstate->execute(); if ($Qstate->fetch() !== false) { echo 'State: ' . $Qstate->value('title'); } Multiple Result Set Returning a multiple result set is performed as: $Qstates = $CLICSHOPPING_Db->prepare('select id, title from :table_states where country_id = :country_id'); $Qstates->bindInt(':country_id', 1); $Qstates->execute(); while ($Qstates->fetch()) { echo 'State: ' . $Qstates->value('title'); } Array Result Set An array can be retrieved containing either all rows of the result set or all columns of the current row: $Qstates = $CLICSHOPPING_Db->prepare('select id, title from :table_states where country_id = :country_id'); $Qstates->bindInt(':country_id', 1); $Qstates->execute(); $states_all = $Qstates->fetchAll(); $current_state = $Qstates->toArray(); Result Exists Checking to see if a result exists is performed as: $Qstates = $CLICSHOPPING_Db->prepare('select id, title from :table_states where country_id = :country_id'); $Qstates->bindInt(':country_id', 1); $Qstates->execute(); if ($Qstates->fetch() !== false) { echo 'States:'; do { echo $Qstates->value('title'); } while ($Qstates->fetch()); } else { echo 'No states exist.'; } Please note that the following will not work: $Qstates = $CLICSHOPPING_Db->prepare('select id, title from :table_states where country_id = :country_id'); $Qstates->bindInt(':country_id', 1); $Qstates->execute(); if ($Qstates->fetch() !== false) { echo 'States:'; while ($Qstates->fetch()) { echo $Qstates->value('title'); } } as calling fetch() in the if statement to check if a row exists and looping through the results again in the while statement will skip the first row of the result set due to the first call to fetch(). The do { .. } while ( .. ) method shown above is the correct way. Type Hinting Columns can be returned as a specific variable type using the following functions: Value Type Function String value HTML Safe String valueProtected Integer valueInt Decimal valueDecimal $Qproducts = $CLICSHOPPING_Db->prepare('select id, title, code, price from :table_products where description like :description order by title'); $Qproducts->bindValue(':description', '%chocolate%'); $Qproducts->execute(); if ($Qproducts->fetch() !== false) { do { echo $Qproducts->valueInt('id') . ': ' . $Qproducts->valueProtected('title') . ' (' . $Qproducts->value('code') . ') = ' . $Qproducts->valueDecimal('price'); } while ($Qproducts->fetch()); } [code] [b]Affected Rows[/b] The number of rows affected by an insert, update, or delete query can be returned as: [code] $Qupdate = $CLICSHOPPING_Db->prepare('update :table_states set title = :title where id = :id'); $Qupdate->bindValue(':title', 'Beverly Hills'); $Qupdate->bindInt(':id', 1); $Qupdate->execute; echo 'Affected rows: ' . $Qupdate->rowCount(); Please do not use rowCount() for select queries as this is not supported by PDO. Total Rows Retrieving the total rows of a query can be performed as: $Qtotal = $CLICSHOPPING_Db->prepare('select SQL_CALC_FOUND_ROWS id from :table_orders where status = :status'); $Qtotal->bindBool(':status', true); $Qtotal->execute(); echo 'Total rows: ' . $Qtotal->getPageSetTotalRows(); getPageSetTotalRows() requires SQL_CALC_FOUND_ROWS to exist in the query and automatically retrieves the total rows using select found_rows() after the query has been executed. It is also possible to use fetchAll() however this method uses more server resources and is not recommended: $Qorders = $CLICSHOPPING_Db->prepare('select id from :table_orders where status = :status'); $Qorders->bindBool(':status', true); $Qorders->execute(); echo 'Total rows: ' . count($Qtotal->fetchAll()); Page Sets Returning a page set result is performed as: $Qorders = $CLICSHOPPING_Db->prepare('select SQL_CALC_FOUND_ROWS order_number, total_price From :table_orders where customer_id = :customer_id and status = :status order by id desc limit :page_set_offset, :page_set_max_results'); $Qorders->bindInt(':customer_id', 1); $Qorders->bindBool(':status', true); $Qorders->setPageSet(15); $Qorders->execute(); if ($Qorders->getPageSetTotalRows() > 0) { echo 'Orders'; while ($Qorders->fetch()) { echo 'Order #' . $Qorders->valueInt('order_number') . ': ' . $Qorders->valueDecimal('total_price'); } echo $Qorders->getPageSetLabel('Displaying <strong>{{listing_from}}</strong> to <strong>{{listing_to}}</strong> (of <strong>{{listing_total}}</strong> orders)'); echo $Qorders->getPageSetLinks(); } Parameters setPageSet($max_results, $page_set_keyword, $placeholder_offset, $placeholder_max_results) Parameter Value $max_results The number of results to show per page. $page_set_keyword The name of the parameter holding the current page value. Default: page $placeholder_offset The name of the binding placeholder used as the limit offset in the sql query. Default: page_set_offset $placeholder_max_results The name of the binding placeholder used as the limit row number in the sql query. Default: page_set_max_results The parameter name of the current page value is passed as the second parameter. The default value is page and the value is retrieved from $_GET['page'] if it exists. Caching Caching of select query result sets improves performance by storing the result of the query in a cache file and subsequently reading the cached data until the cache expiration time is reached. As soon as the cache expiration time is reached, the database is queried again and the cached information is refreshed with the new result set. $Qcfg = $CLICSHOPPING_Db->prepare('select key, value from :configuration'); $Qcfg->setCache('configuration'); $Qcfg->execute(); while ($Qcfg->fetch()) { echo $Qcfg->value('key') . ': ' . $Qcfg->value('value'); } Parameters setCache($key, $expire, $cache_empty_results) Parameter Value $key The name of the cache block to retrieve or save. $expire The time in minutes the cached data should be saved for. A value of 0 keeps the cached data indefinitly until it has been manually cleared. Default: 0 $cache_empty_results A boolean value to cache or not cache empty result sets. Default: false Shortcuts Shortcut functions wrap Db::prepare() into a simpler interface to help write code faster for simpler queries. Db::get() Db::get() can be used to retrieve rows from a simple query. $Qstates = $CLICSHOPPING_Db->get('states', [ 'id', 'title' ], [ 'country_id' => 1 ], 'title' ); while ($Qstates->fetch()) { echo $Qstates->value('title'); } Parameters Db::get($table, $fields, array $where, $order, $limit, $cache, array $options) Parameter Value $table One (string) or more tables (array) to retrieve the rows from. Aliases may be used as: ['countries as c', 'states as s'] Table names are automatically prefixed unless the prefix_tables option is set as false (see the $options parameter). $fields One (string) or more fields (array) to retrieve. Aliases may be used as: ['c.countries_id as id', 'c.countries_title as title'] $where Array containing keys and values matching the column name to the condition: ['id' => 1] $order One (string) or more fields (array) to sort by: ['title', 'c.date_added'] $limit An integer value to limit the number of rows to, or an array containing two integer values to limit the number of rows (second value) with an offset (first value): [1, 15] $cache An array consisting of the parameters (in order) sent to setCache(). $options An array containing the following options: ['prefix_tables' => true] A more complex multi-relationship query example can be performed as: $Qproducts = $CLICSHOPPING_Db->get([ 'products p', 'products_to_categories p2c' ], [ 'count(*) as total' ], [ 'p.products_id' => [ 'rel' => 'p2c.products_id' ], 'p.products_status' => '1', 'p2c.categories_id' => '1' ] ); $products_count = $Qproducts->valueInt('total'); Db::save() Db::save() can be used to insert or update data in a table. $result = $CLICSHOPPING_Db->save('states', [ 'title' => 'California' ], [ 'id' => 1 ] ); echo 'Affected rows: ' . $result; Parameters Db::save($table, array $data, array $where_condition, array $options) Parameter Value $table The table to save the data to. $data An associative key=>value array containing the data to save in the table. The array keys must match the table field names the array value should be saved in. $where_condition If no condition is passed, the data is inserted into the table as a new record. If an associative $key=>$value array is passed, it is used as the where condition of the query to update the data of an existing record. $options An array containing the following options: ['prefix_tables' => true] Db::delete() Db::delete() can be used to delete a single, multiple, or all records from a table. $result = $CLICSHOPPING_Db->delete('states', ['id' => 1 ]); echo 'Affected rows: ' . $result; Parameters Db::delete($table, array $where_condition, array $options) Parameter Value $table The table to delete the records from. $where_condition If no condition is passed, all records in the table are deleted. If an associative $key=>$value array is passed, it is used as the where condition of the query to delete the matching records. The array keys must match the table field names the array value is matched against. $options An array containing the following options: ['prefix_tables' => true] use Cache $Qcfg = $CLICSHOPPING_Db->prepare('select key, value from :configuration'); $Qcfg->setCache('configuration'); $Qcfg->execute(); while ($Qcfg->fetch()) { echo $Qcfg->value('key') . ': ' . $Qcfg->value('value'); } get information from Db $Qstates = $CLICSHOPPING_Db->get('states', [ 'id', 'title' ], [ 'country_id' => 1 ], 'title' ); while ($Qstates->fetch()) { echo $Qstates->value('title'); } $Qcfg = $CLICSHOPPING_Db->prepare('select key, value from :configuration'); $Qcfg->setCache('configuration'); $Qcfg->execute(); while ($Qcfg->fetch()) { echo $Qcfg->value('key') . ': ' . $Qcfg->value('value'); }
  4. Configuration Introduction The main installation configuration parameters are stored in the following locations: Type Location Global includes/ClicShopping/Conf/global.php Shop includes/ClicShopping/Sites/Shop/site_conf.php Shop includes/ClicShopping/Sites/ClicShoppingAdmin/site_conf.php The global configuration file and all site configuration files are automatically loaded into their own groups when the framework is initialized. The global configuration file is loaded into a 'global' group, and the site configuration files are loaded into their own Site group (eg, 'ClicShoppingAdmin', and 'Shop'). Reading a configuration value is first attempted at the Site level, and if the configuration key does not exist, the global value is returned. A Site level configuration parameter has priority over a global level parameter if a global level configuration parameter is also defined. Custom Configuration Files It's possible to create custom configuration files that have priority over the values from the core configuration files. Custom configuration files can be stored in the following locations: Type Location Global includes/ClicShopping/Custom/Conf/global.php Per-Site includes/ClicShopping/Custom/Sites/SITE/site_conf.php Configuration File Format The format of the configuration parameters are stored in a "ini" style format in a PHP file that is assigned to a $ini PHP variable. This style of configuration was chosen over a plain text .ini file to prevent configuration parameters being read in cases of the configuration files being publicly accessible through the web server. An example format for the global configuration file is: <?php $ini = <<<EOD db_server = "localhost" db_server_username = "dbuser" db_server_password = "dbpass" db_database = "my_db_name" db_table_prefix = "clic_" store_sessions = "MySQL" time_zone = "Europe/Berlin" EOD; An example of a Site configuration file is: <?php $ini = <<<EOD dir_root = "/www/html/" http_server = "https://demo.shop" http_path = "/" http_images_path = "images/" http_cookie_domain = ".clicshopping.shop" http_cookie_path = "/" EOD; External Configuration Files External configuration files can be loaded using the following code: use ClicShopping\OM\CLICSHOPPING; CLICSHOPPING::loadConfigFile($path_of_file, 'ext_group'); This would load the configuration parameters of $path_of_file to the 'ext_group' configuration group. It is important that the ini format is stored as a string to the $ini PHP variable otherwise the configuration parameters can not be parsed. Retrieving Configuration Parameters Configuration parameters can be retrieved using CLICSHOPPING::getConfig(): use ClicShopping\OM\CLICSHOPPING; $value = CLICSHOPPING::getConfig('cfg_name'); In this example, the cfg_name configuration parameter from the current Site group is returned. If the current Site group does not contain the configuration parameter, the global group value is returned. It's possible to define which group the configuration parameter should be loaded from by defining the group name: use ClicShopping\OM\CLICSHOPPING; $value = CLICSHOPPING::getConfig('cfg_name', 'ext_group'); This would load the cfg_name configuration parameter from the ext_group group. The following can be used to first see if a configuration parameter exists: use ClicShopping\OM\CLICSHOPPING; if (CLICSHOPPING::configExists('cfg_name')) { .... } This will check if cfg_name exists in the current Site group or the global group. Checking to see if a configuration parameter exists in a specific group is performed as follows: use ClicShopping\OM\CLICSHOPPING; if (CLICSHOPPING::configExists('cfg_name', 'ext_group')) { .... } Please note that if the configuration parameter does not exist in the specified group, a check is also performed in the global group. Setting Configuration Parameters Runtime configuration parameters can be set as follows: use ClicShopping\OM\CLICSHOPPING; $value = true; CLICSHOPPING::setConfig('is_true', $value, 'ext_group'); If no group is specified in the third parameter, the configuration parameter would be set in the global group. This function does not save the configuration parameter to the configuration file - it only sets a runtime configuration parameter value.
  5. ClicShopping\OM is a framework utilizing new features in PHP to improve the performance, security, and modularity of the codebase. Taking advantage of namespaces and autoloading, it is now even easier to add new features and extend existing features without the need to edit core source code files. The base framework is located in the includes/ClicShopping directory: Framework Namespace Location Core ClicShopping\OM includes/ClicShopping/OM Sites ClicShopping\Sites includes/ClicShopping/Sites Apps ClicShopping\Apps includes/ClicShopping/Apps Custom ClicShopping\Custom includes/ClicShopping/Custom Namespaces/Autoloader The framework is built utilizing the PSR-4 standard for autoloading classes from matching namespaces and file paths. Classes are automatically loaded on demand and don't need to be included/required manually. The base namespace the autoloader watches for is ClicShopping\ and loads the class files located in the includes/ClicShopping/ directory. Examples Class File Location ClicShopping\OM\CLICSHOPPING includes/ClicShopping/OM/CLICSHOPPING.php ClicShopping\OM\Db includes/ClicShopping/OM/Db.php ClicShopping\OM\Registry includes/ClicShopping/OM/Registry.php ClicShopping\Sites\Shop\Shop includes/ClicShopping/Sites/Shop/Shop.php ClicShopping\Apps\VENDOR\APP\APP includes/ClicShopping/Apps/VENDOR/APP/APP.php Classes in the framework must declare their namespace as the first PHP code in the file. Examples namespace CLICSHOPPING\OM; class NewClass { .... } The full namespace to the above example would be: ClicShopping\OM\NewClass and the location of the file would be: includes/ClicShopping/OM/NewClass.php For another class to be able to load ClicShopping\OM\NewClass automatically, it needs to be declared with PHP's use keyword after the namespace of the class and before any other PHP code. Examples namespace ClicShopping\OM; use ClicShopping\OM\NewClass; class AnotherNewClass { public function __construct() { $NewClass = new NewClass(); } } The framework autoloader (ClicShopping\OM\CLICSHOPPING::autoload()) is registered as an autoloader in includes/application_top.php and is automatically initialized in all main PHP files that include the application_top.php file. Template files do not need to have a namespace set, but still need to reference framework classes that it uses: Examples use ClicShopping\OM\HTML; echo HTML::outputProtected('Hello World!'); More information about namespaces can be found at the PHP Namespace documentation page. Sites Sites are registered in the framework to initialize and apply environment parameters specific to that site. The available sites in the core are: Site Controller Shop (default) ClicShopping\Sites\Shop\Shop Admin ClicShopping\Sites\ClicShoppingAdmin\Admin Sites are registered and retrieved as follows: use ClicShopping\OM\CLICSHOPPING; CLICSHOPPING::initialize(); CLICSHOPPING::loadSite('Shop'); $site = CLICSHOPPING::getSite(); Custom Directory To customize a core source file, copy it to this directory matching the directory structure of the original file. For example, - to make custom changes to ClicShopping/OM/Session/File.php - copy the complete file to ClicShopping/Custom/Session/File.php and perform your changes to this new file. Notes Although the custom class is copied to a Custom directory, it must retain the original Core namespace. Due to this, copied classes cannot extend the original class in the Core namespace. ClicShopping\Custom\Conf Configuration setting ClicShopping\Custom\Sites\Shop (default) Shop classes ClicShopping\Custom\OM OM classes ClicShopping\Custom\Schema Database file installation Apps Apps are self-contained packages that add new or extend existing features through modules and hooks. Apps reside in their own directory and do not need to edit core source code files. Apps are located in the following directory: Namespace Location ClicShopping\Apps\VENDOR\APP includes/ClicShopping/Apps/VENDOR/APP Apps also have a public directory for public accessible files such as stylesheets, javascript, and images, located at: public/Apps/VENDOR/APP More information is available in the Apps chapter. Service Services are portions of the online store that do not directly relate to the customer purchasing a product, but can be helpful in setting up the store. Services are available in Shop and ClicShoppingAdmin. it can use everywhere inside the site. Example Service for the mail namespace ClicShopping\Service\Shop; use ClicShopping\OM\Registry; use ClicShopping\OM\Mail as MailClass; class Mail implements \ClicShopping\OM\ServiceInterface { public static function start() { if (is_file(CLICSHOPPING_BASE_DIR . 'OM/Mail.php')) { Registry::set('Mail', new MailClass()); return true; } else { return false; } } public static function stop() { return true; } } How to call inside a file : $CLICSHOPPING_Mail = Registry::get('Mail');
  6. Change theme is easy, first you must install a new theme in the template directory and after in administration, you can change the theme in you Design configuration
  7. No, it not the best pratice, you you want to customize ClicShopping, it's better to have you own template. The process is simple, 1 - inside default template direcotry, copy the files 2 - recreate the architecture of the directory and copy the files ClicShopping, override the default files by the new files. Default template can be use when there is an upgrade, that's why it's not a best pratice to change something inside the directory
  8. A few people here asked that we have a thread on Adwords, so I'll start it. I've used Adwords since 2003 when you could do a nickel a click. Then, it became a dime and the race was off. Over time I've learned a lot and had a love/hate relationship. This year Adwords account managers have helped me in updating and learning new features. Currently, my ROI is the best it's been in at least a very long time, so I’ll try to share some ideas. For me, a big key is getting a repeat customer, but I also get some good sales from it. First, you need to tie in Analytics, which is now part of Adwords. Analytics can show you what sales you are getting through different ads and you can get the actual order id. This helps in adjusting ads or even stopping those that don't pay off. I look a lot at last 7 days and 30 days. The 7 day view is good because you can see how small bid adjustments can cost a lot. This can be done in the Adwords screens too. https://adwords.google.com/analytics/ And using a Google Feeder like Jack's, you need to set up with Google Shopping. I was slow to get this going, but it's really working well on some items I sell. This gets you the ad boxes you see with pics at the top of Google as well as Google Shopping. https://merchants.google.com/ That covers the basics but AdWords and Analytics have a lot of features. The biggest thing with AdWords is the better your ad is, the less you have to pay and still rank high. So, take advantage of all the little extras like extended links and callouts. Use all the characters you can but keep substance. Once you create a base ad, you can copy and edit to make versions to test. I added "Fully Secure Website" to one of my ads and it get 4 times the click through than any of my others in that ad group. I did this based on switching to all SSL all the time. Adwords also serves it higher, so it likes it. You can also tailor you bids based on areas like states (Texas for instance). Adjust based on days of the week or time of the day. Adjust up or down for phones with browsers. I bid that down because my biggest competitor on this isn't responsive in their site design. Remarketing was a huge fail for me that burned up cash with no ROI. Small bid adjustments that make you rank higher can cost way more than expected, so the 7 day running view is key. The other key is look at it every day. There is some trial and error, but this can get you sales you are otherwise missing. A lot probably depends on your margin, but for me I'll give 200 to sell 1600 especially since some will repeat. There's a lot more to this and I'm not sure how much this helps, but hopefully others have something to add.
  9. If it can help you to understand google : look theses link A lot of good stuff https://www.thinkwithgoogle.com/
  10. Mobile Friendly Good for checking if site is Mobile Friendly https://search.google.com/search-console/mobile-friendly?utm_source=mft&utm_medium=redirect&utm_campaign=mft-redirect Microdata Testing Tools Good for Schema. https://search.google.com/structured-data/testing-tool Facebook Link Good for Opengraph. https://developers.facebook.com/tools/debug/ Twitter Card Validator https://cards-dev.twitter.com/validator SSL https://www.ssllabs.com/ssltest/index.html"] https://www.ssllabs.com/ssltest/index.html Performs a deep analysis of the configuration of any SSL web server. Page Speed Tools https://gtmetrix.com GTmetrix is a free tool that analyzes your page's speed performance.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use