This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT products.sku, products.name, products.uri, products.price, products.short_description, | |
| COALESCE( MIN( price_modifiers.price ), products.price ) AS selling_price, | |
| ROUND (( products.price - MIN( price_modifiers.price ) ) | |
| / products.price * 100 - 0.5 ) AS discount_percent, | |
| ROUND( AVG ( messages.rating ), 1 ) AS rating, | |
| inventories.quantity AS inventory | |
| FROM navigations navigation | |
| JOIN navigation_products | |
| ON navigation.navigation_id = navigation_products.navigation_id | |
| JOIN products |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use utf8; | |
| package Interchange6::Schema; | |
| use strict; | |
| use warnings; | |
| use base 'DBIx::Class::Schema'; | |
| use Interchange6::Schema::Result::Address; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins: | |
| DBIC: | |
| default: | |
| dsn: dbi:Pg:dbname=danceshop | |
| user: dancepower | |
| password: dancethenightaway | |
| schema_class: Interchange6::Schema | |
| options: | |
| RaiseError: 1 | |
| PrintError: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT product.sku, product.name, product.short_description, product.description, product.price | |
| , product.uri, product.weight, product.priority, product.gtin, product.canonical_sku | |
| , product.active, product.inventory_exempt, product.created, product.last_modified | |
| , price_modifier.selling_price | |
| FROM navigation_products me | |
| JOIN products product | |
| ON product.sku = me.sku | |
| LEFT JOIN ( SELECT me.sku, MIN (me.price) AS selling_price | |
| FROM price_modifiers me | |
| LEFT JOIN roles role ON role.roles_id = me.roles_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Interchange6::Schema; | |
| use strict; | |
| use warnings; | |
| use base 'DBIx::Class::Schema'; | |
| use Interchange6::Schema::Result::User; | |
| Interchange6::Schema::Result::User->load_components( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use utf8; | |
| package Interchange6::Schema; | |
| use strict; | |
| use warnings; | |
| use base 'DBIx::Class::Schema'; | |
| use Interchange6::Schema::Result::Order; | |
| use Interchange6::Schema::Result::Product; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| any [ 'get', 'post' ] => '/checkout' => require_login sub { | |
| return forward 404 if config->{shop_disabled}; | |
| return redirect '/cart' if cart->count == 0; | |
| my ( $data, $form, $form_last, $forms_ref, $params ); | |
| my $posted = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Test::More; | |
| use Test::DBIx::Class { | |
| schema_class => 'Interchange6::Schema', | |
| traits => 'Testpostgresql', | |
| resultsets => [ qw/ Order User / ], | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use utf8; | |
| package Interchange6::Schema::Result::TaxRule; | |
| =head1 NAME | |
| Interchange6::Schema::Result::TaxRule | |
| =cut |
NewerOlder